Copying sheets with slicers results in corrupt content

Hi,

I’ve encountered an issue where copying sheets within a workbook that contain slicers defined over tables results in Excel displaying the “We found a problem with some content in…” error when opening the updated workbook.

The simplest replication I’ve found for this is (Aspose Cells .NET):

var workbook = new Workbook();
var worksheet = workbook.Worksheets.First();
var list = worksheet.ListObjects[worksheet.ListObjects.Add(0, 0, 4, 4, false)];
worksheet.Slicers.Add(list, list.ListColumns.First(), 8, 8);
workbook.Worksheets.AddCopy(worksheet.Name);
workbook.Save("output.xlsx");

After running that, opening the “output.xlsx” workbook displays an Excel error. Originally identified it in Aspose Cells .NET 23.8, but still appears to be an issue in 24.6.

From what I can see while debugging, the slicer objects aren’t renamed in the destination sheet, which may be causing it as copying sheets containing sliders within Excel results in updated slider names in the destination sheet.

@ryanmcarthur
By using the sample code to test on the latest version v24.6, we can reproduce the issue. After running the sample code, the result file crashed.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-56102

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@ryanmcarthur,

We are pleased to inform you that your issue (“CELLSNET-56102”) has been resolved. The fix/enhancement will be included in our upcoming release (Aspose.Cells v24.7) which is due in the second week of July this month. You will be notified when the next version is released.

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

Hi,

Thanks for the quick turnaround, however I’m still seeing this issue on Aspose Cells 24.7.0 when copying sheets in existing workbooks, such as in the workbook in the attached archive

slicer.zip (9.3 KB)

The code to produce the corrupted workbook is mostly unchanged, e.g.

var wb = new Workbook(“slicer-copy.xlsx”);
wb.Worksheets.AddCopy(“Sheet1”);
wb.Save(“output.xlsx”);

Where the generated “output.xlsx” workbook displays an error message in excel when opened (although the slicer does appear to work after Excel repairs the workbook).

I’ve also noticed this issue occurring when using the Worksheet.Copy(Worksheet, CopyOptions) method for sheets within the same workbook

@ryanmcarthur
By using the sample file and code to test on the latest version v24.7, we can reproduce the issue. After running the sample code, the output file is corrupt.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-56299

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@ryanmcarthur,

We are pleased to inform you that your issue (Ticket ID: “CELLSNET-56299”) has been resolved. The fix will be included in the upcoming release (Aspose.Cells v24.8) which we plan to release in the first half of August 2024. We will notify you when the next release is published.

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