Convert docx to xlsx

I am writing a .NET application that generates reports in docx. One of the last requirements I got was to generate these reports in xlsx format. So, is there an easy way to convert docx to xlsx format? I haven't found any solution or utility / library. One of the ideas was to use Microsoft.Office.Interop Copy / Paste methods, but I don't know if that helps :)

+2


source to share


1 answer


We used an MS tool that allows us to work with Office documents as if they were xml:

Open XML SDK 2.0 for Microsoft Office

http://www.microsoft.com/downloads/details.aspx?FamilyId=C6E744E5-36E9-45F5-8D8C-331DF206E0D0&displaylang=en



This had the following advantages over interop:

  • No need to set up an office.
  • No memory issues due to closing Excel.
  • The best performance, in our case it lasted from 40 seconds to 2 (two)
+1


source







All Articles