Reputation: 2061
I searched around for quite a bit but I'm unable to figure out how to set the default zoom level of a document created using OpenPyXL. Can it be done? If yes, how?
I'm using OpenPyXL 2.0.5.
Upvotes: 9
Views: 8082
Reputation: 2090
I'm using openpyxl version: 2.3.2
and this works for me:
for ws in workbook.worksheets:
ws.sheet_view.zoomScale = 85
workbook.save(excelFile)
Upvotes: 23
Reputation: 19507
You cannot do this at the moment. See https://bitbucket.org/openpyxl/openpyxl/issue/262/set-the-zoom-of-a-sheet f
Upvotes: 2