We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Convert DOCX to XLSX

Is it possible to save a docx file as an xlsx file?
I see references in some old posts but cannot locate anything recent.


Thanks for your inquiry. You can achieve your requirement with the collaboration of Aspose.Words and Aspose.Pdf. First you will convert DOCX to PDF using Aspose.Words and later PDF to XLSX using Aspose.Pdf. Please check following .NET related documentation for details and sample code snippet.

Convert Word document to PDF(Aspose.Words for .NET)
Convert PDF document to Excel(Aspose.Pdf for .NET)

thanks for the links.
the excel file being generated however does not appear to be an excel file.
when I try to open it I get "the file format and extension of don’t match.
saw a post to rename as xml, but that does not get me an excel file.
any suggestions?



Please note It is expected behavior not bug, this warning message appears because Aspose.Pdf saves output as MS Excel 2003 XML format. To avoid this warning message in MS Excel version 2007 and higher without any warning messages you can save output file as XML extension.

// save the output in XLS format

doc.Save(myDir + “PDFtoExcel2007.xml”, excelsave);

thanks for the reply.
i did see that post, but it does not help when a .xml is associated with a program other than excel.
do you know of anything in aspose.cells that will allow me to take the xml and turn it into a xls or xlsx that excel will recognize?


Thanks for sharing the details. Yes. Aspose.Cells is able to load XML file and save output in XLS or XLSX format. Pass XML file as argument to Workbook constructor and provide desires output value as argument to Save method. For further details, please visit the following link