Excel print preview - page setup

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!

jasper160504's picture
Joined: May 3 2016 - 11:04pm
Last seen: 5 years 11 months ago

2 Answers:

Hi,

Take a look at the properties below, maybe you could find them useful in this case:

I hope this helps,

Sanda

shertage's picture
10696
Joined: Sep 26 2006 - 8:06pm
Last seen: 1 year 4 months ago

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

jasper160504's picture
Joined: May 3 2016 - 11:04pm
Last seen: 5 years 11 months ago
Feedback