mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #356] text Wrap issues on different platforms #283
Labels
No labels
awaiting user feedback
bug
cmake
cmake
docs
feature request
in progress
long term
medium term
medium term
pull-request
question
question
ready to close
short term
under investigation
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/libxlsxwriter#283
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @LLMIKU on GitHub (Sep 15, 2021).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/356
Using 1.1.3 now.
Here is the problem:
When I open this file with Numbers on Mac, it shows text is wrapped.
However, when I open it on Windows(Excel) or Android(Latest version WPS),it shows text is not wrapped, but when I edit it, I can see the \n effect.
Maybe something goes wrong in
lxw_escape_control_characters(string)function, but I am not familiar with xlsx format. Is "_x%04X_" this a format control sign?@jmcnamara commented on GitHub (Sep 15, 2021):
It should work as expected in all versions of Excel. Here is an example program:
Output:
As you can see the test is wrapped as expected.
It may appear differently in other applications but that isn't usually an issue with libxlsxwriter since it follows Excel's format exactly.
One thing to note is that Excel automatically expands the height of the row when the file is opened. This isn't something that is controllable by the file format, it is something that happens at run time when Excel opens the file. So if you don't see that in other applications you may have to specify the row height explicitly.
Anyway, can you test the code above with Excel and confirm you get the same results, or otherwise.
@LLMIKU commented on GitHub (Sep 15, 2021):
Thanks a lot, I haven't add that
format_set_text_wrap(format);, after added, it works perfect!