Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to convert word document to xsl/xslt [modified]

How to convert word document to xsl/xslt [modified]

Scheduled Pinned Locked Moved C#
xmlcsharptoolstutorial
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Exelioindia
    wrote on last edited by
    #1

    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

    P 1 Reply Last reply
    0
    • E Exelioindia

      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

      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #2

      Perhaps you mean XML?

      E 1 Reply Last reply
      0
      • P PIEBALDconsult

        Perhaps you mean XML?

        E Offline
        E Offline
        Exelioindia
        wrote on last edited by
        #3

        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

        P 1 Reply Last reply
        0
        • E Exelioindia

          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

          P Offline
          P Offline
          PIEBALDconsult
          wrote on last edited by
          #4

          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.

          E 1 Reply Last reply
          0
          • P PIEBALDconsult

            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.

            E Offline
            E Offline
            Exelioindia
            wrote on last edited by
            #5

            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

            M 1 Reply Last reply
            0
            • E Exelioindia

              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

              M Offline
              M Offline
              Mycroft Holmes
              wrote on last edited by
              #6

              Have you tried the XML/XSL forum, you may have more luck there.

              Never underestimate the power of human stupidity RAH

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups