Hi Thomas.
There is a minimal issue about formatting sheets with wbexport.
I think that the "autofit" function has to be executed "after" the formatting clause of the header column and "after" the filter clause setting so the autofit will be perfect.
Thanks for paying attention to this issue.
Regards
Maurizio
Excel formatting in wbexport
Re: Excel formatting in wbexport
That's the order in which it is done.
The number of "characters" to be added is defined through the property workbench.export.xls.add.filterwidth.numchars - the default is 2. So if that is not enough for you, you can try increasing that number.
- create the "freez pane" if requested
- enable the auto filter
- trigger "auto size"
The number of "characters" to be added is defined through the property workbench.export.xls.add.filterwidth.numchars - the default is 2. So if that is not enough for you, you can try increasing that number.
-
maurizio.scarpis
- Posts: 12
- Joined: 2023-09-04 16:30:11
Re: Excel formatting in wbexport
Thanks for the quick answer. I will try to increase the property workbench.export.xls.add.filterwidth.numchars
Regards
Regards
Re: Excel formatting in wbexport
A little update:
I noticed that when opening the XLSX using LibreOffice Calc the column widths are correct (with and without the filter), even with workbench.export.xls.add.filterwidth.numchars set to zero (so no additional width applied "manually").
After some investigation, it seems that the main reason for the "incorrect" column width is caused by the default font. LibreOffice defaults to "Liberation Sans" while Excel seems to use "Calibri".
I think it might make sense to provide an option to define the font to be used in the spreadsheet.
I noticed that when opening the XLSX using LibreOffice Calc the column widths are correct (with and without the filter), even with workbench.export.xls.add.filterwidth.numchars set to zero (so no additional width applied "manually").
After some investigation, it seems that the main reason for the "incorrect" column width is caused by the default font. LibreOffice defaults to "Liberation Sans" while Excel seems to use "Calibri".
I think it might make sense to provide an option to define the font to be used in the spreadsheet.