Jump to content
We've recently updated our Privacy Statement, available here ×

Excel print preview - page setup


jasper160504
Go to solution Solved by szaharia,

Recommended Posts

I am using jasperreports 5.6.1, and exporting data into excel file using jasper reports.
Excel file has about 25 columns and many rows.
When I print Excel, I am able to see only few columns on a page and the remaining columns in next page.
Just wondering to know, how can I scale the page automatically to print all columns data in one page?
That means, all columns on one page (landscape-mode) and many pages for all the rows.

We can do this manually by the following steps:
In Excel file menu:
File -> page setup-> page tab -> scaling section --> Print all columns at 1 page.

Is it possible to set this in jasper reports?

Thanks a lot!

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • 3 weeks later...

Thanks a lot, it works

<property name="net.sf.jasperreports.export.xls.fit.width" value="1"/>
<property name="net.sf.jasperreports.export.xls.fit.height" value="0"/>

print all columns data in one page and many pages (depending of the number of rows).

Best regards
 Michael

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...