views:

224

answers:

1

Hello,

I am writting .NET application that generates reports in docx. One of the last requirements I've got was - generate also these reports in xlsx format. So, is there any simple 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 it helps :)

A: 

We have used a MS tool that allows you 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 benefits compared with interop:

  • No need in install office
  • No problems with memory due to Excel not closing
  • Better performance, in our case it went from 40 seconds to 2 (two)
Shiraz Bhaiji