You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am sharing my learnings here on how to apply different settings using this library.
Changing from default 'portrait' view to 'landscape'
In Sheet.prototype.toxml, change the orientation to landscape like this ws.ele('pageSetup', { paperSize: '9', orientation: 'landscape', horizontalDpi: '200', verticalDpi: '200' });
For fitting all the content in single page while printing (In excel, you can do this using 'Page setup' option)
Use the below code in Sheet.prototype.toxml as first element in the xml (just above dimension attribute) ws.ele('sheetPr', {}).ele('pageSetUpPr', { fitToPage:1 });
Hide grid lines and set default zoom level ws.ele('sheetViews').ele('sheetView', { workbookViewId: '0', showGridLines:"0", zoomScaleNormal: 50, zoomScale:50 });
Hope this will be useful for somebody.
The text was updated successfully, but these errors were encountered:
pietersv
added a commit
to protobi/msexcel-builder
that referenced
this issue
Aug 24, 2020
Thanks for this library. Works nicely
I am sharing my learnings here on how to apply different settings using this library.
Changing from default 'portrait' view to 'landscape'
In
Sheet.prototype.toxml
, change theorientation
to landscape like thisws.ele('pageSetup', { paperSize: '9', orientation: 'landscape', horizontalDpi: '200', verticalDpi: '200' });
For fitting all the content in single page while printing (In excel, you can do this using 'Page setup' option)
Use the below code in
Sheet.prototype.toxml
as first element in the xml (just abovedimension
attribute)ws.ele('sheetPr', {}).ele('pageSetUpPr', { fitToPage:1 });
Hide grid lines and set default zoom level
ws.ele('sheetViews').ele('sheetView', { workbookViewId: '0', showGridLines:"0", zoomScaleNormal: 50, zoomScale:50 });
Hope this will be useful for somebody.
The text was updated successfully, but these errors were encountered: