Chart Axis Option

I noticed that in XLS, the axis option - Interval between labels is “Automatic”

but for XLSX, the axis option - Interval between labels is "Specify Interval Unit=1"

How can I set the property for XLSX to be Automatic?

Hi,


Thanks for your posting and using Aspose.Cells.

We are afraid, it is a bug and it should be fixed. We tried many other settings but we are unable to set it to automatic. Since, we have replicated this issue so we have logged it in our database for a fix.

This issue has been logged as

  • CELLSNET-45367 - Interval between labels of Chart Horizontal Axis become non-Automatic when XLS is saved as XLSX

I have attached the sample XLS file and output XLSX file as well as screenshot highlighting the issue for a reference.

C#
Workbook wb = new Workbook(“sampleExcel.xls”);

Worksheet ws = wb.Worksheets[0];

Chart ch = ws.Charts[0];
Axis xs = ch.CategoryAxis;

wb.Save(“output.xlsx”);

Hi,

Thanks for using Aspose.Cells.

We are afraid, Aspose.Cells cannot save the automatic value of XLS file (i.e. Saved by MS-Excel 2007 or later version) to XLSX.

In XLS (Saved by MS-Excel 2007), the automatic value is false. We can find some other unknown information of chart. But we cannot make sure it is the setting of automatic value. Now we don't support reading the unknown information.

Please check the attachment (i.e. 1496.zip).

CreateByExcel2003.xls is saved by MS-Excel 2007, CreateByExcel2007.xls is saved by MS-Excel 2016. The two other files are saved by Aspose.Cells. We can find CreateByExcel2003.xls.Save.xlsx is right.