Export Excel formula in JasperReports

Sorry to create another post as the previous one cannot be displayed correctly due to html character.

I am using evaluation copy of aspose.cell for Jasper Report and evaluating if aspose.cell could fulfill our user requirement.

I am able to export editable chart using ACXlsExporter. However, I am unable to export cell value as excel formula using the property:

{property name=“net.sf.jasperreports.export.xls.formula” value=“7”}



The exporter always exports according to the value specified in {textFieldExpression}, or null if it is not set. If I use JRXlsxExporter from Jasper Report, all excel formula can be exported correctly. I could not find



I set the property in my jrxml:

{property name=“net.sf.jasperreports.export.xls.detect.cell.type” value=“true”/}



I also tried to set the parameter before export:

exporter.setParameter(ACXlsExporterParameter.IS_DETECT_CELL_TYPE, Boolean.TRUE) but still fail.



I also checked the demo of aspose but excel formula is never used. Jasper report demo come up with a excel formula example and it works only if I use JRXlsxExporter.



Or if I missed some configuration instead?



I attached my .jrxml and .jrprint file (which is exactly the file XlsFormulaReport come up with the JasperReport demo) and the code snapshot for generating the report.

*******************************

jasperPrint = JasperFillManager.fillReport(“F:\workspace\JasperReport\TestJasperReport\ReportTemplate\XlsFormulaReport.jasper”, hm, beanColDataSource);



File destFile = new File(“F:\workspace\JasperReport\TestJasperReport\Output\XlsFormulaReport.xls”);



ACXlsExporter exporter = new ACXlsExporter();



exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);

exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString());

exporter.setParameter(ACXlsExporterParameter.IS_DETECT_CELL_TYPE, Boolean.TRUE);

exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE);



exporter.exportReport();



********************





Thanks a lot in advance!



Thomas

Hi Thomas,

Thanks for your posting and evaluating Aspose.Cells for JasperReports.

Please see my reply in your other thread. Here is the link.

( Unable to export cell value as Excel Formula )

Hi,
I am not able to generate .XLSX report by using ACXLSExporter. So can you please help me on this. And also how can we able to generate .XLSX report by using aspose.cells.jasperreports jar.

Hi ,
The latest version of aspose.cell.jasperreports.jar 2.0.0 was released in 2016. Can you please update if the latest jar has been released by Aspose.

@J1111111,

Thanks for providing us some details.

Aspose.Cells for JasperReports v2.0.0 is the latest version published in the Downloads section so far.
How you are exporting to XLSX format, do you find any exception ? Please paste the exception trace here. Also, provide your jrxml file, xml data and other config. etc. to trance the issue.

Furthermore, please check the demos in “\demo” folder on how to export XLSX files in the zipped archive of Aspose.Cells for JasperReports v2.0.0 release for your reference.