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

Free Support Forum - aspose.com

Workbook become corrupted after conversion to xls

Hi Aspose team,
We have weird situation with workbook conversion from xlsx to xls format, it becomes corrupted when doing simple conversion using Apose.Cells.dll.
Workbook contains pivot table.
CorruptedXL.png (24.1 KB)

Code sample:

    private static void ConvertExcel(string inputFile, string outputFile, string openPassword)
    {
        Workbook wb = new Workbook(inputFile, new LoadOptions() { Password = !string.IsNullOrEmpty(openPassword) ? openPassword : null });
        wb.Settings.Password = null; // reset password for resulted file
        if (File.Exists(outputFile))
            File.Delete(outputFile);
        wb.Save(outputFile, SaveFormat.Excel97To2003);
    }

Workbooks: workbooks.zip (33.5 KB)

Aspose.Cells.dll version 18.12.0.0

Could you help to understand/resolve this problem?
Thanks in advance.

1 Like

@licenses,

Thanks for the sample files, sample code and screenshot.

After an initial test, I am able to observe the issue as you mentioned by converting your template XLSX file to XLS file format. I found that XLSX workbook becomes corrupted after converting to XLS file format. Probably this is due to the fact that your underlying PivotTable has external data connections but this needs to be evaluated and sorted out. I have logged a ticket with an id “CELLSNET-46526” for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.

@licenses,

We evaluated your issue in details. I am afraid, we cannot support converting the PivotTable with external connection data source between XLSX and XLS. We will support it later on, but we have no plan for it now.

The ticket is still “Open” and once we have an update on it, we will let you know.

We are sorry for any inconvenience caused!