I have a pivot table and chart in sheet2, reference data in sheet1, and I need copy it to sheet3 twice(differen placement).
In Excel I can select the pivot table and chart range and paste to other sheet and will copy all things.
But I have no idea to make it with Aspose.Cells.
Copy range only copy cell value, and have not found any method can copy pivot table and chart to other sheet.
example file:
Pivot table example.zip (15.7 KB)
AI answer have not consider source pivot table fields options and chart options, useless.
@Flithor
By testing on the latest version v25.10 using sample files and the following sample code, we can reproduce the issue. The pivot table was not fully copied when copying the range. Please refer to the attachment. out_net.zip (20.9 KB)
Workbook book = new Workbook(filePath + "Pivot table example.xlsx");
Worksheet sheet2 = book.Worksheets["Sheet2"];
PivotTable pivot = sheet2.PivotTables[0];
Chart chart = sheet2.Charts[0];
Range r = sheet2.Cells.CreateRange("A1", "K13");
Worksheet sheet3 = book.Worksheets["Sheet3"];
Range r1 = sheet3.Cells.CreateRange("A2", "K14");
Range r2 = sheet3.Cells.CreateRange("A21", "K33");
// Init paste options.
PasteOptions options = new PasteOptions();
// Set paste type.
options.PasteType = PasteType.All; ;
r1.Copy(r, options);
r2.Copy(r, options);
book.Save(filePath + "out_net.xlsx");
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-59168
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.
@Flithor,
We are pleased to inform you that your issue (Ticket ID: “CELLSNET-59168”) has been resolved. The fix/enhancement will be included in the upcoming release (Aspose.Cells v25.11) that we plan to release in the first half of November 2025. You will be notified in this thread once the new version is published.
@amjad.sahi
I’d like a preview version to check this fix, and to make us can keep works moving forward.
@Flithor
Sorry, we are unable to provide you with a fixed version. According to company regulations, only those with priority services will be provided with fix versions, so if you want to obtain fix versions faster, you need to purchase priority support. If there is no priority service, fix will also be released in the next release version.
You may check our paid support option where issues are prioritized and posses highest priority if your issue is a real blocker.