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

Free Support Forum - aspose.com

Aspose cells file conversion issue

We are using Aspose.cells to convert back and forth between Excel 2007 (xlsx) and Excel 97-2003 file formats (xls). Following is a code snippet from the ASP page.

------------------------------------------------------------------------
’ If file is an XLSX file, use Aspose.cells to convert XLSX file to XLS
if thefileext = “xlsx” then
Dim workbook
upfilexlsx = “” & thefilename
upfilexls = “” & username & “.xls”
Set license = CreateObject(“Aspose.Cells.License”)
license.SetLicense “Aspose.Cells.lic”
Set workbook = Server.CreateObject(“Aspose.Cells.Workbook”)
workbook.open_6 upfilexlsx, 6 ’ Open the XLSX file
workbook.save_5 upfilexls, 5 ’ Save as XLS file
else ’ No conversion necessary
upfilexls = upfile
end if
------------------------------------------------------------------------

The issue is that the users of some Excel 2007 files have done something to the file causing the following prompt which appears on the screen if you do a manual “save as”:

"Some content in may not be saved because it is not compatible with the Excel 97-2003 (xls) file format. Do you still want to save the workbook in this format?"

When you click ‘Yes’ the save as works.

Is it possible to “force” the save as by ignoring the prompt, in the following line in the code:

workbook.save_5 upfilexls, 5 ’ Save as XLS file


Thank you in advance.



Hi,

When you save as Excel 2007 xlsx file to Excel 2003 xls file format in MS Excel 2007 manually, not all the features/objects and attributes are compatible or supported in the same way. Aspose.Cells does work the same way. You may try to confirm the issue by manually doing the conversion in MS Excel 2007. The error is prompted by MS Excel.

Any ways, we recommend you try to install our latest version v5.1.3.

If you still have any issue, kindly do post your template files with details here, we will try to check it soon.

Thank you.


We have installed the new version of Aspose cells. We still are getting the error on the “save as.”



Is it possible to abort or timeout the “workbook.save” method? That is, if the method does not work (does not respond) within say 1 minute, to abort the process?

Thanks.

Hi,

Please post your input (XLSX) and output (XLS) files, we will check your issue soon.

Thank you.