Hello,
Using birt runtime 4.2.2 in a Spring Web framework setup. Spudsoft Birt emitter excel 0.8.0.201306042016
Spudsoft jar and required jars in WEB-INF/lib folder.
Relevant code is:
and I get the following error:
So my code can find the jars but I have not found any settings for margins except at the hssf level and not sure why I need to based on how BIRT generates other outputs such as HTML or PDF.
I also looked over:
SpudSoft Examples
and it appears I am using the emitter correctly? I have tried using the EXCELRenderOption with no change in the end result or trying with just setting EmitterID and no other options.
Any help appreciated - thank you.
Using birt runtime 4.2.2 in a Spring Web framework setup. Spudsoft Birt emitter excel 0.8.0.201306042016
Spudsoft jar and required jars in WEB-INF/lib folder.
Relevant code is:
RenderOption options = new RenderOption(); options.setOption("ExcelEmitter.SingleSheet", true); options.setOption("ExcelEmitter.DisplayGridLines", true); options.setOption("ExcelEmitter.DisplayRowColHeadings", true); options.setOption("ExcelEmitter.DisplayZeros", true); options.setOption(ExcelEmitter.STRUCTURED_HEADER, false); if ("XLS".equalsIgnoreCase(ext)) { options.setEmitterID("uk.co.spudsoft.birt.emitters.excel.XlsEmitter"); options.setOutputFileName(fileName + ".xls"); } else if ("XLSX".equalsIgnoreCase(ext)) { options.setEmitterID("uk.co.spudsoft.birt.emitters.excel.XlsxEmitter"); options.setOutputFileName(fileName + ".xlsx"); } return options;
and I get the following error:
Jun 05, 2013 11:17:38 AM org.eclipse.birt.report.engine.api.impl.EngineTask handleFatalExceptions SEVERE: An error happened while running the report. Cause: java.lang.IllegalArgumentException: Unknown margin constant: 4 at org.apache.poi.hssf.record.aggregates.PageSettingsBlock.getMarginRec(PageSettingsBlock.java:413) at org.apache.poi.hssf.record.aggregates.PageSettingsBlock.setMargin(PageSettingsBlock.java:442) at org.apache.poi.hssf.usermodel.HSSFSheet.setMargin(HSSFSheet.java:1031) at uk.co.spudsoft.birt.emitters.excel.StyleManagerUtils.prepareMarginDimensions(StyleManagerUtils.java:956) at uk.co.spudsoft.birt.emitters.excel.handlers.PageHandler.createSheet(PageHandler.java:248) at uk.co.spudsoft.birt.emitters.excel.handlers.PageHandler.startTable(PageHandler.java:450) at uk.co.spudsoft.birt.emitters.excel.ExcelEmitter.startTable(ExcelEmitter.java:331) at org.eclipse.birt.report.engine.emitter.CompositeContentEmitter.startTable(CompositeContentEmitter.java:306) at org.eclipse.birt.report.engine.layout.html.HTMLTableLayoutEmitter.startTable(HTMLTableLayoutEmitter.java:386) at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.startContent(ContentEmitterUtil.java:50) at org.eclipse.birt.report.engine.layout.html.buffer.ContainerBufferNode.start(ContainerBufferNode.java:83) at org.eclipse.birt.report.engine.layout.html.buffer.ContainerBufferNode.start(ContainerBufferNode.java:79) at org.eclipse.birt.report.engine.layout.html.buffer.ContainerBufferNode.start(ContainerBufferNode.java:79) at org.eclipse.birt.report.engine.layout.html.buffer.ContainerBufferNode.start(ContainerBufferNode.java:79) at org.eclipse.birt.report.engine.layout.html.buffer.HTMLPageBuffer.startContent(HTMLPageBuffer.java:113) at org.eclipse.birt.report.engine.layout.html.buffer.TableBreakBuffer.startContent(TableBreakBuffer.java:287) at org.eclipse.birt.report.engine.layout.html.HTMLLeafItemLM.start(HTMLLeafItemLM.java:67) at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:139) at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70) at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26) at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140) at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.resumeLayout(HTMLInlineStackingLM.java:111) at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.layoutNodes(HTMLInlineStackingLM.java:160) at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26) at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140) at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70) at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26) at org.eclipse.birt.report.engine.layout.html.HTMLTableBandLM.layoutChildren(HTMLTableBandLM.java:67) at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140) at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70) at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26) at org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layoutChildren(HTMLTableLM.java:132) at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140) at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70) at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92) at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:181) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77) at com.xxx.report.birt.BirtReportGenerator.generateReport(BirtReportGenerator.java:104) at com.xxx.report.birt.SyncWorker.processMessage(SyncWorker.java:94) at com.xxx.report.birt.SyncWorker.run(SyncWorker.java:89)
So my code can find the jars but I have not found any settings for margins except at the hssf level and not sure why I need to based on how BIRT generates other outputs such as HTML or PDF.
I also looked over:
SpudSoft Examples
and it appears I am using the emitter correctly? I have tried using the EXCELRenderOption with no change in the end result or trying with just setting EmitterID and no other options.
Any help appreciated - thank you.