mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #257] [Bug] Text Wrap in Outlook Preview mode #206
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#206
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 @sirhvd on GitHub (Dec 20, 2019).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/257
Originally assigned to: @jmcnamara on GitHub.
Hi @jmcnamara.
I was using the excel files generated from libxlsxwriter library, and upload these file to Outlook mail. (https://outlook.office365.com/)
But I have a small problem when open Excel file in preview mode ( Outlook Mail ).
Text wrap not working in preview mode, but in Windows desktop, it's working fine.
To make text wrap work in preview mode, I must open the excel file then save it again.
I hope you will check it out.
Thank you
Cheers!
@RaFaeL-NN commented on GitHub (Dec 20, 2019):
Excel saves files in text mode with \r\n. libxlsxwriter saves in binary mode. Excel can convert it "on the fly" at open, preview mode can't. See https://github.com/jmcnamara/libxlsxwriter/issues/156 . A solution can be with an option changing write mode (from binary to text).
@jmcnamara commented on GitHub (Dec 20, 2019):
@sirhvd could you add a small, complete C program that generates a file that demonstrates the issue.
Could you also, if possible add a screenshot of the preview in Outlook so that I can try replicate this.
@sirhvd commented on GitHub (Dec 23, 2019):
@jmcnamara Sorry for the late reply. I just using your example code:
I think this problem comes from text/binary mode as @RaFaeL-NN mentions.
@jmcnamara commented on GitHub (Dec 23, 2019):
Thanks for the sample code. I think I see what the issue may be.
When you set word wrap like this Excel resizes the row automatically when it opens the file. That probably isn't happening in the Outlook preview.
Try setting the row height explicitly and see if the result is different:
Output in Excel:
@sirhvd commented on GitHub (Dec 23, 2019):
Thank for your reply.
Set row height will work. But only for static text.
Is there any way to make text wrap work as Excel does?
@jmcnamara commented on GitHub (Dec 23, 2019):
No. This is a calculation that Excel does at run time. It isn't part of the file format so it cannot be controlled from Libxlsxwriter.
The user either has to set the row height explicitly or allow Excel to do it at run time with possible unforeseen actions (like in your case).
In that case I will close this issue since we now know why Outlook Preview behaves differently to Excel in this case.