none
Problem with OpenXML SDK 2.0 RRS feed

  • Question

  • i used DocumentFormat.OpenXml.dll to convert document to open xml ......

    and i succeed partially as follows.

    1. successfully converted .docx to  xml

    2. Giving an error that file hass corrupted data while converting .doc to xml...

    please specify the steps to avoid the error

    Thanks and regards

    Vanaka Srinivas

    • Moved by KareninstructorMVP Saturday, May 24, 2014 11:47 AM Question is more specific to structuring documents then C# specific
    Saturday, May 24, 2014 5:40 AM

Answers

  • Hi.

    Open XML only  works on Office 2007 or later (the file wich extension ends with "X").

    .doc file are a proprietary format of Microsoft and not a standard format like OpenXML.

    http://it.wikipedia.org/wiki/Office_Open_XML

    docx file are a really a zip file that contains a folder strutcture with a lot of xml files that describe the document.


    Regards,
    Bubu
    http://zsvipullo.blogspot.it

    Please mark my answer if it helped you, I would greatly appreciate it.

    Monday, May 26, 2014 7:38 AM
  • Hi Vanaka,

    The Open XML SDK is used for manipulate the XML format Office documents. The doc file is binary format, we can’t use Open XML to manipulate it. I suggest you converting the doc file to docx file first, then using Open XML to convert them to XML.

    Best regards

    Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, May 26, 2014 8:13 AM
    Moderator

All replies

  • Hi.

    Open XML only  works on Office 2007 or later (the file wich extension ends with "X").

    .doc file are a proprietary format of Microsoft and not a standard format like OpenXML.

    http://it.wikipedia.org/wiki/Office_Open_XML

    docx file are a really a zip file that contains a folder strutcture with a lot of xml files that describe the document.


    Regards,
    Bubu
    http://zsvipullo.blogspot.it

    Please mark my answer if it helped you, I would greatly appreciate it.

    Monday, May 26, 2014 7:38 AM
  • Hi Vanaka,

    The Open XML SDK is used for manipulate the XML format Office documents. The doc file is binary format, we can’t use Open XML to manipulate it. I suggest you converting the doc file to docx file first, then using Open XML to convert them to XML.

    Best regards

    Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, May 26, 2014 8:13 AM
    Moderator