EPPlus namedstyle horizontalAlignment

alignment, epplus

Solution

I was able to horizontally center a cell with EPPlus (3.1.3) like this.

 xlWorkSheet.Cells["A1"].Style.HorizontalAlignment = OfficeOpenXml.Style.ExcelHorizontalAlignment.Center;

Problem

I have problem implementing the following code: ``` var newNamedStyle=_workbook.Styles.CreateNamedStyle("testStyle"); newNamedStyle.Style.HorizontalAlignment=ExcelHorizontalAlignment.Center; newNamedStyle.Style.Font.Size=15; ``` but EPPlus doesn't seem to be able to capture the Horizontal Alignment properly. Could this be a bug with EPPlus? Any work around for that?

Original source