Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fit in one page width #168

Closed
georgemeng-cfwt opened this issue Aug 9, 2019 · 4 comments
Closed

Fit in one page width #168

georgemeng-cfwt opened this issue Aug 9, 2019 · 4 comments
Assignees

Comments

@georgemeng-cfwt
Copy link

As building a report, my last request is to make the Excel sheet print ready.

I checked the functions, did not find "Fit all columns on one page” setting. It would be great to have it so it will be very user friendly.

Thanks!

@cfsimplicity
Copy link
Owner

OK, unfortunately this is too late for the new version I've just pushed to master with the new margin methods. I'll look at this one when I get chance and add it to the next release.

@georgemeng-cfwt
Copy link
Author

That is fine, not need it right now, just good to have it.

@cfsimplicity
Copy link
Owner

Hi. I've added a method setFitToPage( workbook, state[, pagesWide[, pagesHigh ] ] ).

When you set the state to true it should preset the print options to squeeze all the sheet's contents into one page by default.

You can specify how many pages wide and high you want to fit the content into. To only fit the columns, set pagesHigh to 0.

I don't have Excel but have tested it on OpenOffice.

Please can you test this on develop and let me know if it does what you want? Thanks.

@georgemeng-cfwt
Copy link
Author

Tested. it worked in my test.

Thank you for your support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants