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

Excel ICellStyle.Rotation not working #170

Description

@TomGriffith

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions