axlsx icon indicating copy to clipboard operation
axlsx copied to clipboard

Weird wrap text behaviour

Open poyzn opened this issue 6 years ago • 0 comments

Hello, I'm experiencing some weird behaviour of styles in a file created with axlsx. I created a report file which has ~90 tabs. Each tab is created with the same script. Some tabs in the file have no problems with styles, but others have. It seems that the problem is caused by wrap_text: true property in alignment style. When I add wrap text style for a cell in the final file it adds sometimes a foreground color to the cell, sometimes adds text indent. And I can't figure out the logic and the reasons.

Here's an example. I have a file with ~90 tabs and here're screenshots of the same cell in the file but from different tabs.

Tab 1 (normal): Tab 1 (normal)

Tab 2 (indents): Tab 2 (lndents)

Tab 3,4 (indents and wrong colours): Tab 3,4 (lndents and wrong colour) Tab 3,4 (lndents and wrong colour)

When I disable word wrap in Excel for the cell, it also removes colour and indent. Please check the screencast

And one more thing. When I add a new tab to that file ( which was generated by axlsx and includes ~90 tabs ), absolutely new tab, add a sentence to any cell, apply word wrap property to it and try to change font size it doesn't show correct font size until word wrap is disabled.

Any Ideas?

poyzn avatar Dec 03 '18 09:12 poyzn