INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Hard coding a value to an XSLT file

Hard coding a value to an XSLT file

(OP)
All,

I have an XSLT file that used to style a report in Excel format. I'd like to hard code some values in the XSLT file. These values will be a few lines of disclaimers since the file will soon be used by external clients.

Here's a table being added that displays at the top of the Excel file:

<xsl:template name="CreateWorkSheet">
<xsl:param name="PortfolioCode" />
<xsl:element name="Worksheet">
<xsl:attribute name="ss:Name">
<xsl:value-of select="$PortfolioCode"/>
</xsl:attribute>
<xsl:variable name="LiqHorizonCol">
<xsl:call-template name="CalcLiqHorizonColCount">
<xsl:with-param name="PortfolioCode" select="$PortfolioCode" />
</xsl:call-template>
</xsl:variable>
<!-- Common Data -->
<Table x:FullColumns="1" x:FullRows="1">

After the table opens, it writes some basic info about the report and specify the rows/cells in the Excel file:

<Row ss:Index="1">
<Cell>
<Data ss:Type="String">Portfolio Name:</Data>
</Cell>
<Cell>
<Data ss:Type="String">
<xsl:value-of select="ivy:PortfolioName"/>
</Data>
</Cell>
</Row>

I think the opening tab tells it Row 1 since it appears in the first row.

I tried adding some tags specifying a much lower row but it didn't work. It pushed everything down. My guess is that I need to build a new table at the end of the XSLT file. Anyone know if that's correct or if there's a better way to get my hard coded disclaimers in the Excel file?

Thanks,
Mark

RE: Hard coding a value to an XSLT file

Hi Mark,

I usually start this kind of project by creating a spreadsheet, saving it, and then reverse engineering the resulting XML into XSLT.

Excel can be quite picky about things. In the case of ssLIndex, in my experience you definitely have to have increasing values and no overlap.

The bits you have shown don't give enough context to allow much help...

Tom Morrison
Hill Country Software

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close