OpenXML Word Table RRS feed

  • Question

  • User1445074224 posted


    I have, successfully, used OpenXML to present SQL data as a table in a Word document.

    The resulting table is NOT editable. For example, the cell content cannot be changed and no new rows can be added.

    Can anyone help with code to make the resulting table editable (in both ways listed above)?

    The C# is LONG so, before I post it all, can anyone point me in the right direction so that I can try to solve it myself ("Wrap your table in...", "See this page...", etc.)?


    Thursday, September 17, 2015 3:44 PM

All replies

  • User614698185 posted

    Hi banksidepoet,

    Your issue related to Open XML Format SDK, I think you could post your issue to Microsoft Office for Developers -> Open XML Format SDK  Forums.

    They can answer your question.

    Best Regards,

    Candice Zhou

    Friday, September 18, 2015 1:39 AM
  • User1445074224 posted

    Thank you for your response. I have come across some MS OpenXML forums before which weren't that helpful but these look new. I'll take a look.

    Friday, September 18, 2015 2:32 AM
  • User-1157115462 posted

    Why don't you create another document in MS Word manually and compare their document.xml files. There must be a difference and you should be able to nitice it. If you don't use it yet, download and install Open XML Package Editor for Visual Studio. This VS extension will allow you to examine docx. files.

    BTW, If I understand you correcly, you are trying to create your own template-based mail-merge solution. I strongly suggest you to first take a look at this toolkit. It already solves what you are trying to achieve and the solution is flexible, powerful and polished. It can handle dynamic images, charts, headers, footers, conditional contents, nested tables, buletted/numbered paragraphs...

    Monday, September 21, 2015 3:58 AM
  • User1445074224 posted

    Thanks, Boris.

    I am looking into the Package Editor.

    No, I am not creating a mail merge. Something similar but it is an invoice system which merges data into a Word template. I have seen the toolkit youre referring to before, but not quite what I need this time around.

    Wednesday, September 30, 2015 7:57 AM