hzleonardo hzleonardo -5 years ago 162
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?

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download