Jump to content
JasperReports Library 7.0 is now available ×

Exception while creating xls report


sureshtatikonda1982

Recommended Posts

Hi,

 

When i am executing the same JRXML file with pdf its working fine when i am trying to execute with Excel exporter its giving the following exception...

 

Can any one help me where the mistake i did ...

 

How to solve this....

 

Error exporting print...

java.lang.IllegalArgumentException: Sheet name cannot be blank, greater than 31 chars, or contain any of /*?[] at org.apache.poi.hssf.record.BoundSheetRecord.setSheetname(BoundSheetRecord.java:211) at org.apache.poi.hssf.model.Workbook.setSheetName(Workbook.java:473) at org.apache.poi.hssf.model.Workbook.setSheetName(Workbook.java:467) at org.apache.poi.hssf.usermodel.HSSFWorkbook.createSheet(HSSFWorkbook.java:413) at net.sf.jasperreports.engine.export.JRXlsExporter.createSheet(JRXlsExporter.java:144) at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReportToStream(JRXlsAbstractExporter.java:354) at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReport(JRXlsAbstractExporter.java:199) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:1081) at java.lang.Thread.run(Unknown Source)

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

I had a similar problem. Here's what worked for me:

After calling JasperFillManager.fillReport(...) and getting back a JasperPrint object, call .setName() on the JasperPrint object and insure that the name you specify is <=31 chars in length and has none of the offending characters /*?[]

Link to comment
Share on other sites

  • 3 years later...

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