Skip to content

Alignment cannot be used with a created cell format. #305

@DevonReynolds

Description

@DevonReynolds

In the styles.xml, excel seems to expect it to be alignment then protection. With the creation of a new cell format it always creates the protection which will always put it before the alignment. If I change the code to force create the alignment before it creates the protection in the create method it "fixes" it but I don't' think that's the correct approach.

What excel expects
image

What openXLSX creates
image

In the demo10.cpp file, the cell format is copied from a cell that doesn't have a format. This bug doesn't effect the format when created this way.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestresolvedThis issue has been resolved.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions