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.

@vedavyas.velaga,

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

Hi Amjad,
Thanks for the update.
I can see that the fix is working fine for the previously shared template file.

But when I am verifying with some other files It looks the fix is not working. I am attaching another template file where I am still facing this issue of Command and ConnectionInfo data getting deleted .
Could you please look into this and do the needful.

DataConnectionDetailsGotDeleted.zip (75.0 KB)

@vedavyas.velaga,

Thanks for the new 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 data connections detail is missing in the output file.
e.g.
Sample code:

Workbook workbook = new Workbook(stringFilePath);
workbook.Save(outputFilePath, Aspose.Cells.SaveFormat.Xlsm);

I have logged a separate ticket with an id “CELLSNET-51761” 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 our upcoming release (Aspose.Cells v22.9) which is scheduled in the second week of September 2022. You will also be notified when the next version is released.

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