Open ronnyek opened 1 week ago
@ronnyek, That`s the only reason I need a library for Excel native file generation. Please let me know if you found a solution for that?
In this library you need to specify the column widths when creating the worksheet see https://github.com/salvois/LargeXlsx?tab=readme-ov-file#column-formatting so to set the size based on the content you would need to loop through your data and calculate the string width based off the formatting using a technique like one of the ones suggested here https://stackoverflow.com/questions/263614/calculate-the-display-width-of-a-string-in-c to find the maximum size. There is no magic autosize setting.
I generate xlsx files, and all works well, but by default columns are minimal width, and I don't have anyway to know what is ideal length.
I'm wondering if there is anyway I can automatically size them based on the text content within?