Jump to content
Changes to the Jaspersoft community edition download ×

JExcelAPIExporter Problem


rabbas

Recommended Posts

Hi,

I am using jasper-reports-1.3.2 and jxl-2.6. I am also using Spring and its provided views to display the reports on the web in different format. Everything works fine except JExcelApiExporter. I wrote a simple class to start using Jasper JExcelApiExporter class. I am getting an exception (Can't add cell) when I try to view the Excel report.

_________________________________________________

net.sf.jasperreports.engine.JRException: Can't add cell.

at net.sf.jasperreports.engine.export.JExcelApiExporter.exportText(JExcelApiExporter.java:365)

at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportPage(JRXlsAbstractExporter.java:433)

at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReportToStream(JRXlsAbstractExporter.java:346)

at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReport(JRXlsAbstractExporter.java:176)

at org.springframework.ui.jasperreports.JasperReportsUtils.render(JasperReportsUtils.java:139)

____________________________________________________

 

The view class basically just exports the JExcelAPIExporter class instead of the JRXlsExporter. Any idea why this is happening. I took the jxl jar from our iReports installation because we can actually view reports in JExcel from there. Is there any version problems?

 

Thanks,

Abbas

Link to comment
Share on other sites

  • Replies 9
  • Created
  • Last Reply

Top Posters In This Topic

Our customers are using Excel97, a very old microsoft office product. They are complaining the logo image didn't display in the excel report on their client.

 

JExcelAPIExporter has any other third-party lib requirements? BTW, we are using windowsxp, no any problem exporting excel, and logo image display.

 

thanks.

Link to comment
Share on other sites

Our customers are using Excel97, a very old microsoft office product. They are complaining the logo image didn't display in the excel report on their client.

 

JExcelAPIExporter has any other third-party lib requirements? BTW, we are using windowsxp, no any problem exporting excel, and logo image display.

 

thanks.

Link to comment
Share on other sites

Sorry for the late reply.

 

The root cause is that there is a malformedURL Exception. Our report has embedded URLs. The base path is passed in as the parameter of the report and the rest is added inside the report. The PDF and other formats of the report show the full URL starting with http:// .... and work fine. But from the exception below it seems that Exporter just gets the relative path and throws the Exception that it doesn't have any protocol attached to URL inside the report.

 

I don't why the ExcelApiExporter would not get the full URL because all the other formats do and work fine.

 

 

Caused by: java.net.MalformedURLException: no protocol: /XXXX/secure/XXXX.html?SomethingId=2

at java.net.URL.<init>(Unknown Source)

at java.net.URL.<init>(Unknown Source)

at java.net.URL.<init>(Unknown Source)

at net.sf.jasperreports.engine.export.JExcelApiExporter.exportText(JExcelApiExporter.java:359)

Link to comment
Share on other sites

  • 2 months later...
  • 4 months later...
  • 2 weeks later...
  • 4 months 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...