Excel chart data label text alignment changes

Hi team, we found this bug where the text alignment of data labels gets set to center alignment even though they were originally in left alignment. This happens by just opening the file in aspose and saving it. i added an example file I was using to test where the data label changes its alignment. i was testing this in the latest aspose version 25.11
Original Label:
image.png (1.6 KB)
Label after saving in aspose:
image.png (1.1 KB)

The file i used to test :
Aspose datalabel file.zip (11.1 KB)

@ecarrillo

Summary
We can reproduce the issue: a workbook that contains a chart with left‑aligned data labels is opened with Aspose.Cells, saved, and the data‑label alignment becomes centre‑aligned.

Steps to verify

  1. Re‑produce – Load the supplied .xlsx file with Aspose.Cells and save it again. Open the original and the saved files in Excel and confirm that the data‑label alignment has changed.

  2. Inspect the chart XML – Unzip both .xlsx files, open the chart part (e.g., xl/charts/chart1.xml) and compare the <a:bodyPr> element that controls text alignment. In the original file you should see an attribute such as anchor="l" (left). In the file saved by Aspose.Cells the attribute is either missing or set to anchor="ctr", which explains the visual change.

  3. Report to Aspose support – Provide the original workbook, the saved workbook, and the XML diff. This information allows the support team to investigate the behaviour and, if it is a bug, schedule a fix.

  4. Temporary workaround – After saving the workbook, edit the chart XML yourself: add or replace the attribute anchor="l" in the <a:bodyPr> element, then re‑zip the package. This restores the left alignment because the alignment is stored in the XML, not via a dedicated API call.

  5. Validate with newer builds – When a newer Aspose.Cells build is available, repeat the load‑save test. If the alignment is retained, the issue has been resolved.

Note
At present Aspose.Cells does not expose a property or method to set the data‑label text alignment directly, so the XML‑editing approach is the only programmatic way to preserve the alignment until a fix is released.

:warning: Please validate this behaviour with your exact SDK version and a minimal repro, as support can vary by release.

@ecarrillo,

Thanks for the template XLSX file and screenshots.

We reproduced the issue as you have mentioned by using your template XLSX file to re-save it by Aspose.Cells for .NET. We found MS Excel chart data label text alignment was changed in the output XLSX file.

Workbook workbook = new Workbook("e:\\test2\\Chart.xlsx");
workbook.Save("e:\\test2\\out1.xlsx");

We require thorough evaluation of the issue. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-59471

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.