sanshi
July 21, 2022, 10:45pm
1
Hi, we finally upgrade our Aspose Cell .Net from 19.2 to 22.5. Immediately I see horizontal center alignment doesn’t work any more. We set the style like so,
cellsStyle.HorizintalAlignment = TextAlignmentType.Center;
cellsStyle.VerticalAlignment = TextAlignmentType.Center;
someCells[row, col].SetStyle(cellsStyle);
Any suggestions please. Thanks.
@sanshi
We tried the following codes:
Workbook workbook = new Workbook();
Cells cells = workbook.Worksheets[0].Cells;
Style style = cells["A1"].GetStyle();
style.HorizontalAlignment = TextAlignmentType.Center;
style.VerticalAlignment = TextAlignmentType.Center;
cells["A1"].SetStyle(style);
workbook.Save(dir + "dest.xlsx");
There is no issue .
sanshi
July 22, 2022, 2:18am
3
@simon.zhao Thank you for the prompt confirmation. I’ll do more testing.