Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hard coding a value to an XSLT file

Status
Not open for further replies.

meckeard

Programmer
Aug 17, 2001
619
0
0
US
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
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top