Open XML Word Processing: how to sort a table in word document using openXML

Neha Dharmadhikari 1 Reputation point
2021-02-11T11:40:23.457+00:00

Hi,
I am using Open XML word processing to add a table into a word document. I want to sort the table content using open xml word processing. Is there any way to sort the table using open xml?
Thanks.

Office Open Specifications
Office Open Specifications
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Open Specifications: Technical documents for protocols, computer languages, standards support, and data portability. The goal with Open Specifications is to help developers open new opportunities to interoperate with Windows, SQL, Office, and SharePoint.
127 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Hung-Chun Yu 976 Reputation points Microsoft Employee
    2021-02-12T21:25:18.733+00:00

    Hi Neha

    Thank you for contacting Microsoft Open Specifications Support.

    Looking at WordprocessingML ISO29500-1 Standard, section 17.4 Tables and Working with WordprocessingML Table Class with Open XML SDK. It appeared they don't have any higher functions like Table Sorting.

    There are couple options – Office VBA - Table.Sort method, use HTML Table Sorting, or Table.Sort via Power Query.

    And you can also reach out to Eric White to see if he plan to add support for Table.sort with Open-XML-PowerTools https://github.com/EricWhiteDev/Open-Xml-PowerTools

    Let me know if this helped answer your question.

    1 person found this answer helpful.
    0 comments No comments