hzleonardo hzleonardo - 10 months ago 56
Python Question

Set window size for xlsxwriter

I cannot set the window size for created excel file with xlsxwriter and it always creates small window on OSX. Is there a way to set window size on xlsxwriter?


There isn't an API to do it in XlsxWriter (you could open a feature request if you like).

In the meantime you can change these properties in the workbook object, shown below with the inbuilt defaults:

    workbook.window_width = 16095
    workbook.window_height = 9660

I'm not sure what the units are but it is probably twips.

Update: I've add a workbook set_size() method for this.