Skip to content
This repository has been archived by the owner on Nov 24, 2020. It is now read-only.

Excel ICellStyle.Rotation not working #170

Open
TomGriffith opened this issue Mar 23, 2020 · 0 comments
Open

Excel ICellStyle.Rotation not working #170

TomGriffith opened this issue Mar 23, 2020 · 0 comments

Comments

@TomGriffith
Copy link

When using ICellStyle.Rotation to rotate a column header 90 degrees it works fine but setting it to -90 sets it to zero. The documentation states it can be set between -90 and 90. I also tried -89 and 270 to see what happened but they both set to 0 as well.

Sample code:

Dim vertStyle As ICellStyle = workbook.CreateCellStyle()
vertStyle.Rotation = -90
cell = row.CreateCell(0)
cell.SetCellValue("Employment")
cell.CellStyle = vertStyle

With Rotation set to -90 degrees it appears like this (note: this is in LibreOffice but it looks the same in Excel):
image

With Rotation set to 90 degrees it appears like this (appears to be working correctly):
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant