Jump to content
Changes to the Jaspersoft community edition download ×

auto resize cell width in excel export


bhaskars_1

Recommended Posts

Hi,

we have been using jasper reports library(6.0.0) for generating and exporting excel reports. I had a query regarding the same wherein we want to resize the width of columns according to the length of the data present within it. Have tried setting the following property but this  apparantly has no effect on the widths of the cells- 

<property name="net.sf.jasperreports.export.xls.auto.fit.column" value="true"/>

in addition to this, we are also disabling wrap text, which works fine, but the column width is not resized.

Any help regarding the same would be appreciated.

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

I have tried setting it in the properties map in JasperPrint as well as in the TextColumnBuilder while defining columns.

 

Also, tried setting the property in the jrxml under reportElement. This doesn't seem to work either.

 

In which version is this property working? Might try it out. And would I set the property on each column?

 

Thanks!

Link to comment
Share on other sites

  • 1 year later...

I am using 6.5.1 and still having this issue. Setting net.sf.jasperreports.export.xls.wrap.text=false with net.sf.jasperreports.export.xls.auto.fit.column=true seems to interfere with each other and the cell is formatted as wrap text = true even though the property was false.

Does anyone have any updates on this?

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...