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

Free Support Forum - aspose.com

Resizing Issues when copying Worksheet

Dear Aspose Support Team

We have a template Excel file (Template.xlsx) which contains an embedded Word document in a worksheet. When copying this worksheet into a new file (Result.xlsx), the embedded Word document gets resized: select the embedded Word document -> context menu -> Format Object… -> Tab Size -> the Width differs (100% for Template.xlsx and 98% for Result.xlsx). Some of the columns are also resized.
How can we avoid this? We would like the embedded Word document and the columns to remain the exact same size when copying a worksheet.

WordShrink.zip (146.0 KB)

@awepler,

Please notice, I am able to reproduce the issue as you mentioned. I found resizing Issue with Embedded OLE object when copying worksheet b/w the workbooks. I have logged a ticket with an id “CELLSJAVA-43307” for your issue. We will look into it soon.

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

@awepler,
This is to inform you that we have fixed your issue now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

@awepler,

Please try our latest version/fix: Aspose.Cells for Java v20.9.7 (Attachment):
aspose-cells-20.9.7-java.zip (7.2 MB)

Your issue should be fixed in it. Please call Workbook.setDefaultStyle() method to set the default style of the underlying workbook.
e.g
Sample code:

workbook = new Workbook();
workbook.getWorksheets().removeAt(0);
Workbook templateWorkbook = new Workbook(TEMPLATE_FILE);
workbook.setDefaultStyle(templateWorkbook.getDefaultStyle());

Let us know your feedback.

Thank you for your support and providing a fix. It seems to be working fine now.

@awepler,
You are welcome.

The issues you have found earlier (filed as CELLSJAVA-43307) have been fixed in Aspose.Cells for Java 20.10. This message was posted using Bugs notification tool by ahsaniqbalsidiqui