Hot to convert a Wordml to XSL
-
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. 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. Thanks in advance.
Know is Drop, Unknown is Ocean