How to convert word document to xsl/xslt [modified]
-
Hi all, Please suggest me how to convert a word document to xsl/xslt (.doc file to xsl file). Please provide me some sample code or URL from where I can do this using C# 2.0 without using any third party tools. Thanks in advance
Know is Drop, Unknown is Ocean
modified on Tuesday, July 20, 2010 9:16 AM
-
Hi all, Please suggest me how to convert a word document to xsl/xslt (.doc file to xsl file). Please provide me some sample code or URL from where I can do this using C# 2.0 without using any third party tools. Thanks in advance
Know is Drop, Unknown is Ocean
modified on Tuesday, July 20, 2010 9:16 AM
Perhaps you mean XML?
-
Perhaps you mean XML?
No, actually our requirement is to generate XSL file based on the word document (word document is an template with mail merge, later we merge data with this template document retrieved from database). We have different kind of document, for each selected document we have to create XSL file dynamically using C#.
Know is Drop, Unknown is Ocean
-
No, actually our requirement is to generate XSL file based on the word document (word document is an template with mail merge, later we merge data with this template document retrieved from database). We have different kind of document, for each selected document we have to create XSL file dynamically using C#.
Know is Drop, Unknown is Ocean
The I have no idea, but perhaps you could post a small example of what sort of structure is in the document and what XSL you want to produce.
-
The I have no idea, but perhaps you could post a small example of what sort of structure is in the document and what XSL you want to produce.
Hi, Thanks for you response. Below is sample template document, in this Date, Name, Age, Address are merge field. I have to convert this template document to XLS. <Date> <Name>, <Age> <Address> Dear <Dr./Mr./Ms. Last Name>: Below is the sample XLS for above template. (We created this manually) <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ibex="http://www.xmlpdf.com/2003/ibex/Format"> <xsl:template match="InvitationContemplateInfo"> <fo:block margin-left="0.785in" margin-top="0.7in" margin-right="0.88in" color="gray" font-family="'Times New Roman'" font-size="11.5pt" letter-spacing="0.15pt"><xsl:value-of select="//Date"/> <xsl:if test="//Name[. != '']"> <xsl:value-of select="//Name"/></xsl:if> <xsl:if test="//Age[. != '']"> <xsl:value-of select="//Age"/></xsl:if> </fo:block> </xsl:template> </xsl:stylesheet> Like this we have to create for all different kind of template documents dynamically. Thank you once again.
Know is Drop, Unknown is Ocean
-
Hi, Thanks for you response. Below is sample template document, in this Date, Name, Age, Address are merge field. I have to convert this template document to XLS. <Date> <Name>, <Age> <Address> Dear <Dr./Mr./Ms. Last Name>: Below is the sample XLS for above template. (We created this manually) <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ibex="http://www.xmlpdf.com/2003/ibex/Format"> <xsl:template match="InvitationContemplateInfo"> <fo:block margin-left="0.785in" margin-top="0.7in" margin-right="0.88in" color="gray" font-family="'Times New Roman'" font-size="11.5pt" letter-spacing="0.15pt"><xsl:value-of select="//Date"/> <xsl:if test="//Name[. != '']"> <xsl:value-of select="//Name"/></xsl:if> <xsl:if test="//Age[. != '']"> <xsl:value-of select="//Age"/></xsl:if> </fo:block> </xsl:template> </xsl:stylesheet> Like this we have to create for all different kind of template documents dynamically. Thank you once again.
Know is Drop, Unknown is Ocean
Have you tried the XML/XSL forum, you may have more luck there.
Never underestimate the power of human stupidity RAH