Axis title reference is unexpectedly removed when saving/reopening a workbook from Aspose

Hi,

My workbook has a chart where the axis title references to a cell in the data worksheet. I noticed that if I clear the cell, save the workbook and reopen it, the axis title reference will be removed. This is not the same behaviour in MS Excel, where even if the cell content is empty, the reference is preserved so that if I type in text on the cell again, the axis title will reapear.

Code:

var workbook = new Workbook(@"\test.xlsx");
var ws = workbook.Worksheets[1];
Cells cells = ws.Cells;
cells.ClearContents(cells.MinRow, cells.MinColumn, cells.MaxRow, cells.MaxColumn);
workbook.Save(@"\test2.xlsx");
var newWorkbook = new Workbook(@"\test2.xlsx"); // reopen the saved xlsx
newWorkbook.Worksheets[1].Cells[“E4”].PutValue(@“test”); // apply the text to the referenced cell
newWorkbook.Save(@"\out.xlsx"); // axis title missing

I’ve attached the test files and a recording of MS Excel behaviour for your reference. Could you please take a look?

test.zip (1.6 MB)
image.png (28.1 KB)

Thanks,

@ServerSide527,

Please notice, I am able to reproduce the issue as you mentioned by using your template file. I found axis title reference is unexpectedly removed when saving/reopening a workbook processed by Aspose.Cells APIs. I have logged a ticket with an id “CELLSNET-49179” for your issue. We will look into it soon.

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

Hi @ServerSide527
Please try the latest fix 21.9.5.
Aspose.Cells21.9.5 For .Net2_AuthenticodeSigned.Zip (5.6 MB)
Aspose.Cells21.9.5 For .Net4.0.Zip (5.6 MB)
Aspose.Cells21.9.5 For .NetStandard20.Zip (5.6 MB)

The issues you have found earlier (filed as CELLSNET-49179) have been fixed in this update. This message was posted using Bugs notification tool by simon.zhao