tksheet
tksheet copied to clipboard
Changing the width of each column separately
Hi. Thanks for the "tksheet". Please tell me how to set the column width separately, for example, set the column width "A" to 20, column width "B" = 100, "C" = 200 and so on. I tried almost everything and "get_column_text_width", but all columns still become the same size.
Hello, I am not sure exactly how your code looks but:
- Use this function to set individual columns to a specific width in pixels https://github.com/ragardner/tksheet/wiki/Version-7#set-or-get-a-specific-column-width
- Column widths can only be set for existing columns or overwritten for all of them
- Make sure you have not enabled auto resizing of columns
This function may also interest you but it is for overwriting all displayed column widths and you have to provide an iterable of ints for every column
https://github.com/ragardner/tksheet/wiki/Version-7#set-or-reset-displayed-column-widthslines