TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
kan-qiu
NA
1
0
transform xml to excel using xslt
Jan 11 2005 2:56 PM
I am using xslt to tranform data to Excel and CSV file(for user to download data), it is fine to transform data to CSV, but when I transform data to excel, some fields that with numeric value like 000123 were truncated to 123. I don't want hose Leading zeros were truncated but I don't know how to control that. Here is part of the code for(int i=0; i< sFields.Length; i++) { writer.WriteString("\""); writer.WriteStartElement("xsl:value-of"); writer.WriteAttributeString("select", sFields[i]); writer.WriteEndElement( ); // xsl:value-of writer.WriteString("\""); if (i != sFields.Length - 1) writer.WriteString( (fileType == FileType.CSV ) ? "," : " " ); }
Reply
Answers (
0
)
Saving and Loading
Laptop Battery