After exporting to Excel and creating a copy of the sheet, the new copied sheet is unhiding any hidden columns and also resetting columns width in .NET

Hi,

Using Apose.Cells version 19.8.0 and after exporting to and opening in Excel, a sheet with hidden columns and rows, and different columns width, looks fine.
image.png (42.1 KB)

Now if we make a copy of this sheet, we see that the hidden rows remain hidden but hidden columns get unhidden. We also notice that the columns width get reset.
image.png (39.6 KB)

These 2 issues are happening as from Aspose.Cells version 18.11.0 and onward. It works perfectly fine in version 18.10.0

I have attached the exported file. Open it and make a copy of Sheet2.
aspose bug.zip (8.3 KB)

@adookhit,
I can not reproduce this issue with below code with Aspose.Cells for .NET 19.10 so share your code snippet for our testing.

var workbook = new Workbook("aspose bug.xlsx");
workbook.Save("Copy.xlsx");

I think you didn’t understand what I was trying to say.

The attached aspose bug.xlsx has been generated using Aspose.
Now if you open this file in Excel and then make a copy of Sheet 2, you will see that the columns widths will get reset and also any hidden columns will get unhidden.

  1. Right click on Sheet 2 tab
    image.png (41.8 KB)
  2. Make a copy of the sheet
    image.png (52.8 KB)
  3. Result:
    image.png (45.3 KB)

@adookhit,

Thanks for the screenshots.

We understand your issue now. But we need two stand alone sample projects (preferably console applications) one with older Aspose.Cells version v18.10 as working sample and other with latest version v19.10 to produce the output file(s). You may zip each project separately and attach it here. We will check it soon.

Please find the requested projects:

  1. With Aspose.Cells version 19.10.0
    Aspose19.10.zip (5.0 MB)

  2. With Apose.Cells version 18.10.0:
    Aspose18.zip (4.7 MB)

@adookhit,

Thanks for the sample projects.

We will check and get back to soon.

@adookhit,

After an initial test, I am able to reproduce the issue as you mentioned by using your sample project using latest version/fix. I found after exporting to MS Excel file and then creating a copy of the sheet in MS Excel, the newly copied sheet is un-hiding any hidden columns and is also resetting columns width. I could not find this issue with the output file (using similar code) generated by older version (e.g v18.10). I have logged a ticket with an id “CELLSNET-46971” for your issue. We will look into it soon.

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

@adookhit,

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.

@adookhit,

Please try our latest version/fix: Aspose.Cells for .NET v19.10.3 (attached)

Your issue should be fixed in it.

Let us know your feedback.
Aspose.Cells19.10.3 For .Net2_AuthenticodeSigned.Zip (5.0 MB)
Aspose.Cells19.10.3 For .Net4.0.Zip (5.0 MB)

Hello,

Thanks for the update/fix.
I’ll try and let you know.

Thanks,
Ajay

@adookhit,

Please take your time to evaluate the fix/version. Hopefully it will figure out your issue.

The issues you have found earlier (filed as CELLSNET-46971) have been fixed in Aspose.Cells for .NET v19.11. This message was posted using Bugs notification tool by Amjad_Sahi

Thank you for the notification.

@adookhit,

You are welcome.