When will worksheet.copy support copying drawings when used with .xlsx file

I'm trying to copy a worksheet that contains a drawing. If the file is an .xls, the drawing copies over but if the file is an xlsx it doesn't. I'm using code similar to the following:

wb.Open("Book1.xlsx");
Worksheet wks = wb.Worksheets.Add("New Sheet");
wks.Copy(wb.Worksheets["Sheet1"]);
wb.Save("Updated.xlsx");

Hi,

Please try the attached latest version/fix v4.8.1.7.

For your information, TextBox, Chart, Picture, Form controls etc. are supported in xlsx file format now when copying the worksheets.

If you still find the problem, kindly give us your template xlsx file here, we will check it soon.

Thank you.

Still doesn’t work. Attached is a sample workbook.

Hi,

Thanks for providing us the template xlsx file.

Well, I am afraid auto-shapes are not supported in copying worksheets operation for Xlsx file format. Your feature request has been logged into our issue tracking system with an issue id: CELLSNET-12592. We will soon look into it and let you know about it.

Thank you.

Hi,

Please try the attached version. We have supported to copy auto-shapes in copying worksheet operation for Xlsx file format within a workbook.

Thank you.

Copying the autoshape works now. Thanks.

However, my other requirment is that worksheet.SheetToImage() include the autoshape as well. It works with .XLS but not with .XLSX.

Hi,

"However, my other requirment is that worksheet.SheetToImage() include the autoshape as well. It works with .XLS but not with .XLSX."

Yes, we are aware of this limit, we will look into your desired feature(sheet-to-image including auto-shapes) for xlsx format. We will get back to you soon.

Thank you.

Hi,

Well, currently, we only preserve auto-shapes in the xlsx files. We do not support to convert it to Shape object. We can start to work on it after we have supported to read pivot table for xlsx files.


Thank you.

@jherrmann,

We have supported copying drawing shapes in XLSX file format in newer versions. Moreover, we supported the feature (create, manipulate and refresh Pivot Tables in XLS/XLSX (MS Excel 2007 - 2019)) with enhancements in newer versions. We recommend you to kindly upgrade to and give it a try to latest version of Aspose.Cells. Also, see the document for your reference:
Create Pivot Tables and Pivot Charts