Small column widths are not copied correctly when using Worksheet.Copy Method

Small column widths are not copied correctly when using Worksheet.Copy Method.





See columns G, K, M etc in results workbooks.





See attached code to replicate and source and output Workbooks.

Hi Michael,

Thanks for your posting and using Aspose.Cells.

We were able to observe this issue. Small width columns get hidden or not copied correctly in the output workbooks. We have logged this issue in our database for investigation. We will look into it and resolve this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as CELLSNET-42241.

Hi,

Thanks for using Aspose.Cells for .NET.

We have fixed this issue.

Please download and try this fix: Aspose.Cells for .NET v7.7.0.2 and let us know your feedback.

Appears fixed in test code.

Many Thanks

Hi,


Good to know that your issue is fixed now. Feel free to contact us any time if you need further help or have some other queries or issue, we will be happy to assist you soon.

Thank you.

The issues you have found earlier (filed as CELLSNET-42241) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

With this fix, all columns up to an including the last valid (or used) column have their size set correctly, however:

Columns to the right of the column that is the last valid (or used) column do not get their size set correctly.

Could you look at re-opening this issue please.

Many thanks,

Mike

Hi Mike,

Thanks for your feedback and using Aspose.Cells.

I was not able to observe this issue using the latest version: Aspose.Cells
for .NET v7.7.1.4
and it works fine.

I have tested this issue with the following code. I have attached the output xlsb files for your reference. If you still find any issue, then please provide us a screenshot highlighting the issue with red circles. We will look into it and log the issue in our database for a fix.

C#


string filePath = @“F:\Shak-Data-RW\Downloads\col\Columns Width Issue.xlsb”;


Workbook sourceWorkbook = new Workbook(filePath);

Worksheet sourceWorksheet = sourceWorkbook.Worksheets[0];

Workbook destinationWorkbook = new Workbook();

Worksheet destinationWorksheet = destinationWorkbook.Worksheets.Insert(0, SheetType.Worksheet);

destinationWorksheet.Copy(sourceWorksheet, new CopyOptions { ColumnCharacterWidth = false });

destinationWorkbook.Save(filePath + “.false.xlsb” , SaveFormat.Xlsb);

destinationWorksheet.Copy(sourceWorksheet, new CopyOptions { ColumnCharacterWidth = true });

destinationWorkbook.Save(filePath + “.true.xlsb”, SaveFormat.Xlsb);