Wrong read of Horizontal Alignment

I want copy the style’s Horizontal Alignment property (that is set “General”) in another style. But when I want read Horizontal Alignment on the style I want to copy through the method “style.getHorizontalAlignment()” return “Left” and also the number values will be alignment to the left. Why I have this behavior?

@PietroTGK
Would you like to provide your sample file and executable Console project? We will check it soon.

@John.He Maybe I understand the the solution. After set the horizontal alignment, I set also the indent level, and when I set this property (in my case, I set 0) the horizontal alignment set in automatic “Left indent”. But if I invert the method, for first the indent and after the alignment, the output is good.

@PietroTGK
If the indent level(not 0) is set in MS Excel, you will find horizontal alignment will be auto changed if it’s not left or right before setting.
We change horizontal alignment too when setting indent level as MS Excel. But there is a bug that we change it when setting 0 indent level. We will fix it later.
Now please do not set indent level if it’s zero.

@PietroTGK
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-55500

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.

@PietroTGK,

We are pleased to inform you that your issue (logged as “CELLSNET-55500”) has been resolved. The fix will be included in our upcoming release (Aspose.Cells v24.5) that we plan to release in the second week of May 2024. You will be notified when the next version is released.