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

Free Support Forum - aspose.com

XLS file with Pivot table converted to XLSM is corrupted and data connections details got deleted

I have created an XLS fie using MS office 2019, in the file added a pivot table with data connection to sql server.
Using Aspose.Cells converted the file to XLSM format, which outputted a corrupted file with data connection details are deleted.
PFA
PivotTableIssueXlsToXlsm.zip (22.8 KB)

@vedavyas.velaga,

Thanks for the template file.

Please notice, I am able to reproduce the issue as you mentioned by converting your template XLS file to XLSM file format. I found the output file is corrupted and data connections are removed.
e.g.
Sample code:

Workbook workbook = new Workbook("e:\\test2\\PivotTables_SourceFile.xls");
workbook.Save("e:\\test2\\out1.xlsm", Aspose.Cells.SaveFormat.Xlsm);

I have logged a ticket with an id “CELLSNET-51180” for your issue. We will look into it soon.

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

@vedavyas.velaga,

This is to inform you that your issue has been resolved. The fix will be included in the next release (Aspose.Cells for .NET v22.6) which is scheduled in the second week of June 2022. You will also be notified when the next version is published.

The issues you have found earlier (filed as CELLSNET-51180) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi

Hi Amjad,

The mentioned issue is not fixed completely, Data connection details are still getting deleted in XLSM file converted from XLS.
Below is the screenshot of XLS file’s data connection details.
image.png (21.3 KB)

But when it is converted to XLSM these data connection details got deleted.
image.png (12.8 KB)

In programmatically these details can be verified at

DirectCast(workbook.DataConnections(0), Aspose.Cells.ExternalConnections.DBConnection).Command
DirectCast(workbook.DataConnections(0), Aspose.Cells.ExternalConnections.DBConnection).ConnectionInfo

@vedavyas.velaga,

You are right. The data connection details are removed in the output XLSM file as I tested with new version. I have reopened your issue and we will be looking into it soon.

Hi Amjad,
I just want to check if there is any update/progress about this issue.
Thank you

@vedavyas.velaga,

Your issue is “in Progress” and hopefully either it will be fixed soon or we could share latest updates or ETA on it.

Once we have any new information, we will update you.

@vedavyas.velaga,

To update you on your issue, we are working over your issue and hopefully it will be fixed before July 8, 2022.