Issue with set_column actual width different from set width
See original GitHub issueHi,
I am using XlsxWriter to do set the width to 8.5 but it appears to set it to 8.57. Setting 8.5x also sets it to 8.57.
I am using Python version 3.7 and XlsxWriter 1.1.6 and Excel version 2013.
Here is some code that demonstrates the problem:
import xlsxwriter
workbook = xlsxwriter.Workbook("x.xlsx")
worksheet = workbook.add_worksheet()
worksheet.set_column('A:AF', 8.50)
workbook.close()
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Set the table column width constant regardless of the amount ...
Its important to notice this: "The browser will then set column widths based on the width of cells in the first row of...
Read more >column-width - CSS: Cascading Style Sheets - MDN Web Docs
Indicates the optimal column width. The actual column width may differ from the specified value: it may be wider when necessary to fill ......
Read more >C# EPPlus column width issue - Microsoft Q&A
C# EPPlus column width issue. I have set column width 0.94 but after excel generation getting lesser width. is it bug? can anyone...
Read more >Sizing | True DBGrid for WinForms | ComponentOne - GrapeCity
Sizing. In This Topic. Set Column Width; Auto-adjust Column Width; Set Minimum and Maximum Column Width. True DBGrid lets you set the size...
Read more >Cannot Set Column Width — DataTables forums
I need to set specific columns to specific widths in px. ... scrollCollapse: true, paging: false, info: false, order: [[ 0, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok. That is why the column sizes are different and why you can set 8.50 exactly. However, in the Excel default of “Calabri 11” that XlsxWriter supports, it isn’t possible to set a column width of 8.50.
Even in your set up there are probably sizes that you can’t set. For example any of the sizes between 56 and 57 pixels.
The size is not the default.
Font: MS Pゴシック Size: 9