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

@TomGriffith

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions