This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: stylesheet to writing to excel


Actually, after searching for info for a while, I discovered it's pretty
straightforward. Excel will read csv, tab-separated, or html. Create a 
style sheet to output any of these will work. I chose to output tab-
separated through a servlet. The piece I was stuck on for a while was how to
output tabs and newlines. The following variables were what I needed.

<xsl:variable name="newline">
  <xsl:text>&#10;</xsl:text>
</xsl:variable>
<xsl:variable name="tab">
  <xsl:text>&#9;</xsl:text>
</xsl:variable>

Separate each element with <xsl:value-of select="$tab"/> and end each row
with <xsl:value-of select="$newline"/>. If you are streaming it to a browser
you have to also set the content type.

HTH,
-Steve

-----Original Message-----
 I was wondering whether anyone knows where I can find tutorials for 
writing stylesheet for excel applications (i.e. transform an xml to a excel 
document), if possible can somebody tell me where i could find such 
information

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]