Closed dfujim closed 5 years ago
Commit ba526ccfc4ced312a1aa579e6c78b12fd78bd40b explicitly sets columns to visible.
This is apparently an issue with how windows stores column widths.
"The problem is that for some reason Excel stores column widths in relation to the number of characters whereas everything else is either points or pixels which are convertible"
See this issue report.
It's possible for columns to be set to a width of zero.
Column widths print as "None" (should set to default width).
In multifile_comparer.py, in print_spreadsheet
:
# adjust column sizes, prevent hiding
for i,_ in enumerate(sht.columns):
sht.column_dimensions[get_column_letter(i+1)].auto_size = True
sht.column_dimensions[get_column_letter(i+1)].hidden = False
print(sht.column_dimensions[get_column_letter(i+1)].width) # this line prints None
print(sht.column_dimensions[get_column_letter(i+1)].hidden) # this line prints False
Joss: I just checked and did an autosize width and it is that the widths are zero. You could set them to a specific size (standard size seems to be 96 pixels).
Derek: Fixing the widths is annoying to view in LibreOffice, Ubuntu 18.04.1:
Note the column widths are set in number of characters. The following appears to set reasonable output.
# adjust column sizes, prevent hiding
for i,_ in enumerate(sht.columns):
sht.column_dimensions[get_column_letter(i+1)].auto_size = False
sht.column_dimensions[get_column_letter(i+1)].hidden = False
sht.sheet_format.defaultColWidth = 15
Resolved in commit 8571cf8
Joss finds columns A-H hidden in the spreadsheet.