Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto_width sets 0 widths for non-string type column headers #125

Open
foster999 opened this issue Aug 29, 2020 · 1 comment
Open

auto_width sets 0 widths for non-string type column headers #125

foster999 opened this issue Aug 29, 2020 · 1 comment
Assignees
Labels
bug 🐛 Something isn't working investigate 🔍 Needs looking into L

Comments

@foster999
Copy link
Contributor

foster999 commented Aug 29, 2020

Describe the bug
Using datetime type headers in the table. columns leads to column widths being set to 0.

Expected behavior
Column widths are left as default if they're assigned to 0 and/or a warning is raised to tell the user that they should parse the header objects to strings.

Should also clarify in docs that only strings/rich-text should be used in all non-data elements.

@foster999 foster999 added the bug 🐛 Something isn't working label Aug 29, 2020
@foster999
Copy link
Contributor Author

The default constructor {'strings_to_numbers': True} means that even strings in index columns might also be converted to numbers by XlsxWriter. As such, auto_width needs to take into account number of digits in numbers. Alternatively, we could try switching this to False and making it clear that users should pass strings to these columns.

Above issue still stands for heading types - warning might be best

@foster999 foster999 added this to the v1.0 milestone Sep 29, 2020
@rowanhemsi rowanhemsi added the investigate 🔍 Needs looking into label Jun 27, 2024
@rowanhemsi rowanhemsi removed this from the v1.0 milestone Jun 27, 2024
@ellie-o ellie-o added the L label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working investigate 🔍 Needs looking into L
Projects
None yet
Development

No branches or pull requests

4 participants