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

Free Support Forum - aspose.com

Style corruption after saving and reopening an Aspose.Cells-generated workbook

When building a single Excel workbook based on copies of worksheets from multiple source Excel files using Aspose.Cells we are seeing a problem where some styles in the combined workbook appear to get messed up after opening and re-saving the Aspose-generated file in Excel.

We have seen this in:

  • Excel: Version 2205 (Build 15225.20288).
  • Aspose.Cells: 22.9.0.0 (and some earlier 22.x releases)

We do not see this problem in:

  • Excel: same version as above.
  • Aspose.Cells: 21.7.6.0

The attached sample Visual C# console application and files should help demonstrate/simulate this problem. If you put a 22.x release of Aspose.Cells.dll in the Content folder you will be able to run the application.

AsposeCorruptStylesIssue.zip (100.7 KB)

The sample application begins with an “Executive - Section Inserts.xlsx” workbook as a starting point. A copy of its only worksheet is made and then renamed, removing the original. Worksheets from other workbooks are duplicated, renamed, and copied into the combined workbook. The combined workbook (with 5 total worksheets) is then saved with the name “Full Report Package.xlsx”. The generated output file gets created in: \bin\Debug\net6.0\Content

To reproduce the problem:

  1. Run this sample console application and then open the generated “Full Report Package.xlsx” Excel workbook in Excel
  2. Take a screenshot of the bottom right sections of the “Select Company” and “Select-Projection” worksheets for the 2 “Projected Metrics” summaries (example below).
  3. Save the file in Excel (changing nothing).
  4. Close the file.
  5. Reopen the file again in Excel and check those same bottom right summaries in the 2 sheets against screenshots from step 2 (example below).

You should see something related to the formatting/styles change with one or both sheets’ summary sections.

Here is an example of what I see before & after (you may see other differences-- this doesn’t always seem consistent other than something with Excel styles ends up being displayed incorrectly after the save, close, reopen step):

Before:
image.png (65.3 KB)
Full Report Package - Before Save & Reopen.zip (60.8 KB)

After:
image.png (9.1 KB)
Full Report Package - After Save.zip (61.2 KB)

Let me know if you have any questions.

Thanks!
Mike

@mcowie,

Thanks for the template files, screenshots and samples.

Please notice, after an initial test, I am able to reproduce the exact issue as you mentioned (with details) by using your sample and following your instructions. We will look into it and log an appropriate ticket for it soon.

@mcowie,

A ticket with an id “CELLSNET-52054” has been logged for your issue. We will investigate your issue in details and try to figure it out soon.

Great, thanks so much for the update.

@mcowie,

You are welcome. We will keep you posted with updates (once available) on it.

@mcowie

We have fixed this issue, please check the generated file dest.zip (60.2 KB)
with internal hotfix 22.9.4