Closed mbe81 closed 2 days ago
Yep, you can set windows height and width for default workbook view like this:
f := excelize.NewFile()
f.WorkBook.BookViews.WorkBookView[0].WindowHeight = 95790
f.WorkBook.BookViews.WorkBookView[0].WindowWidth = 95790
Note that the unit of measurement for WindowHeight
and WindowWidth
fields value is twips (One twip is 1⁄1440 inch, or 17.64μm).
Oh, thanks! I looked into the documentation and I could not find anything about it. I also was looking to af function to call but this will work. Thanks for your great work!
When generating an Excel File I would like to control the window size when the Excel sheet is opened for the first time.
I think this is controlled with WorkBookView.WindowWidth and WindowHeight. Currently those fields are filled with defaults in template.go:
const templateWorkbook =
It would be nice if it is possible to override those defaults.