mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #307] Automatic column width #248
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#248
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 @gufoe on GitHub (Sep 16, 2020).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/307
Originally assigned to: @jmcnamara on GitHub.
Hello, is there any way to set the column width to automatically adjust with its content?
@jmcnamara commented on GitHub (Sep 16, 2020):
Unfortunately, there is no way to specify "AutoFit" for a column in the Excel file format. This feature is only available at runtime from within Excel. So it isn't something that we be done be the library.
The only workaround would be to try track the width of the data as you write it and then size the columns based on that. However, even that isn't easy without access to some functions that would given you a pixel, or other, length for a string in a particular font. If you are on Windows you might have that but on other platforms it isn't easy.
@gufoe commented on GitHub (Sep 16, 2020):
Ok, thank you for the info!