Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Openpyxl automatic width

for column_cells in worksheet.columns:
    length = max(len(as_text(cell.value)) for cell in column_cells)
    worksheet.column_dimensions[column_cells[0].column].width = length
Source by code-examples.net #
 
PREVIOUS NEXT
Tagged: #Openpyxl #automatic #width
ADD COMMENT
Topic
Name
5+4 =