Home
Analytics
getting error while using spudsoft excel emitter
ashish13
Hi I am using spudsoft excel emitter to generate .xlsx file, but i am getting the following error.
SEVERE: Error happened while running the report.
java.lang.NoSuchMethodError: org.apache.poi.xssf.usermodel.XSSFColor.<init>([B)V
at uk.co.spudsoft.birt.emitters.excel.StyleManagerXUtils.getXColour(Styl
eManagerXUtils.java:178)
at uk.co.spudsoft.birt.emitters.excel.StyleManagerXUtils.addColourToFont
(StyleManagerXUtils.java:192)
at uk.co.spudsoft.birt.emitters.excel.FontManager.createFont(FontManager
.java:184)
at uk.co.spudsoft.birt.emitters.excel.FontManager.getFont(FontManager.ja
va:236)
at uk.co.spudsoft.birt.emitters.excel.StyleManager.createStyle(StyleMana
ger.java:176)
at uk.co.spudsoft.birt.emitters.excel.StyleManager.getStyle(StyleManager
.java:224)
at uk.co.spudsoft.birt.emitters.excel.handlers.CellContentHandler.setCel
lStyle(CellContentHandler.java:329)
at uk.co.spudsoft.birt.emitters.excel.handlers.CellContentHandler.endCel
lContent(CellContentHandler.java:216)
I have "poi-ooxml-3.6.jar" into my project which contains the "org.apache.poi.xssf.usermodel.XSSFColor" class.
Let me know, if i need to attach any other jar.
Thanks in advance,
Ashish
Find more posts tagged with
Comments
mwilliams
I've used the SpudSoft emitter with no issues, but that probably doesn't mean much. Can you create a sample report, with the sample database, that fails when you use the SpudSoft emitter? This way I can test to see if I have any issues.
mwilliams
Also, what is your BIRT version?
Yaytay
<blockquote class='ipsBlockquote' data-author="'ashish13'" data-cid="98755" data-time="1334056865" data-date="10 April 2012 - 04:21 AM"><p>
Hi I am using spudsoft excel emitter to generate .xlsx file, but i am getting the following error.<br />
<br />
SEVERE: Error happened while running the report.<br />
java.lang.NoSuchMethodError: org.apache.poi.xssf.usermodel.XSSFColor.<init>([B)V<br />
<br />
at uk.co.spudsoft.birt.emitters.excel.StyleManagerXUtils.getXColour(Styl<br />
eManagerXUtils.java:178)<br />
at uk.co.spudsoft.birt.emitters.excel.StyleManagerXUtils.addColourToFont<br />
(StyleManagerXUtils.java:192)<br />
at uk.co.spudsoft.birt.emitters.excel.FontManager.createFont(FontManager<br />
.java:184)<br />
at uk.co.spudsoft.birt.emitters.excel.FontManager.getFont(FontManager.ja<br />
va:236)<br />
at uk.co.spudsoft.birt.emitters.excel.StyleManager.createStyle(StyleMana<br />
ger.java:176)<br />
at uk.co.spudsoft.birt.emitters.excel.StyleManager.getStyle(StyleManager<br />
.java:224)<br />
at uk.co.spudsoft.birt.emitters.excel.handlers.CellContentHandler.setCel<br />
lStyle(CellContentHandler.java:329)<br />
at uk.co.spudsoft.birt.emitters.excel.handlers.CellContentHandler.endCel<br />
lContent(CellContentHandler.java:216)<br />
<br />
I have "poi-ooxml-3.6.jar" into my project which contains the "org.apache.poi.xssf.usermodel.XSSFColor" class.<br />
Let me know, if i need to attach any other jar.<br />
<br />
Thanks in advance,<br />
Ashish<br /></p></blockquote>
<br />
Hi,<br />
<br />
The SpudSoft emitters needs POI 3.8 (at least beta 4, I've tested with beta 5 but it should work with 3.8 release, I'll test that at some point soon).<br />
You can extract the files from the emitters jar (all the libs within the emitters jar are needed for a POJO report engine system).<br />
<br />
If you do have problems with the SpudSoft emitters you can also post bugs on <a class='bbc_url' href='
https://bitbucket.org/yaytay/spudsoft-birt-excel-emitters/issues?status=new&status=open'>bitbucket</a>
, but the absolute most reliable way to contact me is by the email link in my profile on here.<br />
If you do find a bug the first thing I'll ask for is a sample report that demonstrates the problem and that is self contained (i.e. uses only either the sample datasource or a scripted data source).<br />
Jim
ashish13
<blockquote class='ipsBlockquote' data-author="'Yaytay'" data-cid="98790" data-time="1334090939" data-date="10 April 2012 - 01:48 PM"><p>
Hi,<br />
<br />
The SpudSoft emitters needs POI 3.8 (at least beta 4, I've tested with beta 5 but it should work with 3.8 release, I'll test that at some point soon).<br />
You can extract the files from the emitters jar (all the libs within the emitters jar are needed for a POJO report engine system).<br />
<br />
If you do have problems with the SpudSoft emitters you can also post bugs on <a class='bbc_url' href='
https://bitbucket.org/yaytay/spudsoft-birt-excel-emitters/issues?status=new&status=open'>bitbucket</a>
, but the absolute most reliable way to contact me is by the email link in my profile on here.<br />
If you do find a bug the first thing I'll ask for is a sample report that demonstrates the problem and that is self contained (i.e. uses only either the sample datasource or a scripted data source).<br />
Jim<br /></p></blockquote>
<br />
Hi Jim,<br />
<br />
Thanks for the information. I am able to generate the .xlsx excel report using POI 3.8 jar. But i am facing the other problem with Spudsoft emitter. I am not able to provide name of te sheet, which i can do using native excel emitter. Let me know if there is any way to do the same in Spudsoft emitter.<br />
<br />
Thanks,<br />
Ashish
Yaytay
<blockquote class='ipsBlockquote' data-author="'ashish13'" data-cid="98812" data-time="1334128437" data-date="11 April 2012 - 12:13 AM"><p>
I am not able to provide name of te sheet, which i can do using native excel emitter. Let me know if there is any way to do the same in Spudsoft emitter.<br /></p></blockquote>
<br />
Sheet names in the SpudSoft emitter are generated from the names of the BIRT report elements.<br />
Specifically, the last named top level table to start on a page overrides the sheet name.<br />
Any nested tables set the sheet name if it isn't already set (so only the first takes effect, this is so that top level tables override nested tables).<br />
<br />
A named List also sets the sheet name, but more usefully if a List Group has page breaks set and has a TOC entry then that TOC entry is used to set the sheet name.<br />
Note that the List name is only used if there isn't already a name, but the Group TOC overwrites any previous name.<br />
<br />
This approach is supposed to provide a more straightforward (non-scripted) and BIRTy way to set the sheet names, but I think I should probably add support for the page variable too for consistency with other emitters.<br />
<br />
Jim
ashish13
<blockquote class='ipsBlockquote' data-author="'Yaytay'" data-cid="98814" data-time="1334130414" data-date="11 April 2012 - 12:46 AM"><p>
Sheet names in the SpudSoft emitter are generated from the names of the BIRT report elements.<br />
Specifically, the last named top level table to start on a page overrides the sheet name.<br />
Any nested tables set the sheet name if it isn't already set (so only the first takes effect, this is so that top level tables override nested tables).<br />
<br />
A named List also sets the sheet name, but more usefully if a List Group has page breaks set and has a TOC entry then that TOC entry is used to set the sheet name.<br />
Note that the List name is only used if there isn't already a name, but the Group TOC overwrites any previous name.<br />
<br />
This approach is supposed to provide a more straightforward (non-scripted) and BIRTy way to set the sheet names, but I think I should probably add support for the page variable too for consistency with other emitters.<br />
<br />
Jim<br /></p></blockquote>
<br />
<br />
Hi,<br />
<br />
Can you provide the example of how can i define the sheet name, if i am having multiple sheet into one excel report<br />
<br />
Thanks,<br />
Ashish
Yaytay
<blockquote class='ipsBlockquote' data-author="'ashish13'" data-cid="98819" data-time="1334132569" data-date="11 April 2012 - 01:22 AM"><p>
Can you provide the example of how can i define the sheet name, if i am having multiple sheet into one excel report<br /></p></blockquote>
Take a look at the test reports on <a class='bbc_url' href='
https://bitbucket.org/yaytay/spudsoft-birt-excel-emitters/src/e67f9d2539ed/SpudSoft BIRT Excel Emitters Tests/src/uk/co/spudsoft/birt/emitters/excel/tests'>BitBucket</a>.<br
/>
Specifically MultiSheets1.rptdesign and Lists.rptdesign.<br />
The other MultiSheets*.rptdesign report demonstrate other edge cases for generating multiple sheets.<br />
<br />
Jim
ashish13
<blockquote class='ipsBlockquote' data-author="'Yaytay'" data-cid="98820" data-time="1334132908" data-date="11 April 2012 - 01:28 AM"><p>
Take a look at the test reports on <a class='bbc_url' href='
https://bitbucket.org/yaytay/spudsoft-birt-excel-emitters/src/e67f9d2539ed/SpudSoft BIRT Excel Emitters Tests/src/uk/co/spudsoft/birt/emitters/excel/tests'>BitBucket</a>.<br
/>
Specifically MultiSheets1.rptdesign and Lists.rptdesign.<br />
The other MultiSheets*.rptdesign report demonstrate other edge cases for generating multiple sheets.<br />
<br />
Jim<br /></p></blockquote>
<br />
<br />
Hi,<br />
<br />
I am passing the value of sheet names hrough java and in design i am setting the name in OnCreate and On PageBreak script, but the same name is not coming into the excel sheets.<br />
<br />
Java Code:<br />
Object[] workSheetNames = new Object[3];<br />
workSheetNames[0] = "TestingScreen";<br />
workSheetNames[1] = "PassedOutReport";<br />
task.setParameterValue("workSheetNames", workSheetNames);<br />
<br />
<br />
OnCreate:<br />
var paramArray=reportContext.getParameterValue("workSheetNames");<br />
reportContext.setPageVariable( reportContext.PAGE_VAR_PAGE_LABEL, paramArray[0] );<br />
<br />
OnPageBreak:<br />
var paramArray=reportContext.getParameterValue("workSheetNames");<br />
reportContext.setPageVariable( reportContext.PAGE_VAR_PAGE_LABEL, paramArray[1] );
Yaytay
At the moment that isn't supported (I'll add it soon).
How are you generating your page breaks?
If you have a table on the first sheet and a table on the second sheet then you can just set the names of those tables in the BIRT Property Editor.
Jim
ashish13
<blockquote class='ipsBlockquote' data-author="'Yaytay'" data-cid="98822" data-time="1334134454" data-date="11 April 2012 - 01:54 AM"><p>
At the moment that isn't supported (I'll add it soon).<br />
<br />
How are you generating your page breaks?<br />
If you have a table on the first sheet and a table on the second sheet then you can just set the names of those tables in the BIRT Property Editor.<br />
<br />
Jim<br /></p></blockquote>
<br />
Hi Jim,<br />
<br />
I am using one table for each sheet. By defining the table name i am able to define the sheet nam. Thanks for the info.<br />
<br />
Ashish
ashish13
Hi Jim,
When I am using grouping functionality, I am getting two additional column in the left most corner. Can i hide the same. I do not want that to be displayed.
Ashish
Yaytay
Hi Ashish,
I'm not quite sure what you mean, but you could try setting a RenderOption called "ExcelEmitter.DisableGrouping" with a value of Boolean.FALSE.
If that doesn't sort you out, please post a copy of your report design and the resulting Excel workbook and I'll see what I can do.
Jim
ashish13
<blockquote class='ipsBlockquote' data-author="'Yaytay'" data-cid="98848" data-time="1334163442" data-date="11 April 2012 - 09:57 AM"><p>
Hi Ashish,<br />
I'm not quite sure what you mean, but you could try setting a RenderOption called "ExcelEmitter.DisableGrouping" with a value of Boolean.FALSE.<br />
If that doesn't sort you out, please post a copy of your report design and the resulting Excel workbook and I'll see what I can do.<br />
Jim<br /></p></blockquote>
<br />
<br />
Hi Jim,<br />
<br />
It solves my problem. Thanks for the information.<br />
<br />
Regards,<br />
Ashish
ashish13
<blockquote class='ipsBlockquote' data-author="'ashish13'" data-cid="98876" data-time="1334221121" data-date="12 April 2012 - 01:58 AM"><p>
Hi Jim,<br />
<br />
It solves my problem. Thanks for the information.<br />
<br />
Regards,<br />
Ashish<br /></p></blockquote>
<br />
<br />
Hi Jim,<br />
<br />
I have few more queries:<br />
1. Can i generate .csv report using spudsoft. <br />
2. Can i merge the row of particular column dynamically based on the data the column.<br />
<br />
Thanks in advance,<br />
Ashish
Yaytay
<blockquote class='ipsBlockquote' data-author="'ashish13'" data-cid="99169" data-time="1334671516" data-date="17 April 2012 - 07:05 AM"><p>
Hi Jim,<br />
<br />
I have few more queries:<br />
1. Can i generate .csv report using spudsoft. <br />
2. Can i merge the row of particular column dynamically based on the data the column.<br />
<br />
Thanks in advance,<br />
Ashish<br /></p></blockquote>
<br />
1. Not directly.<br />
There are POI examples for converting a spreadsheet into a CSV, but there are also BIRT emitters for going directly to CSV (and they ought to be able to produce better results than going via XLSX).<br />
2. If you can do it in your report design then it ought to work for my emitter, but there is nothing I've done to make it easier for you.<br />
In theory you can rewrite most of your report in the early event handlers, so you could get the data and modify the appropriate cells, but it would be pretty ugly.<br />
I recommend starting a new thread (so you don't get ignored by people not interested in Excel output) and detail what you are trying to achieve (and why).<br />
<br />
Jim
ashish13
<blockquote class='ipsBlockquote' data-author="'Yaytay'" data-cid="99194" data-time="1334686917" data-date="17 April 2012 - 11:21 AM"><p>
1. Not directly.<br />
There are POI examples for converting a spreadsheet into a CSV, but there are also BIRT emitters for going directly to CSV (and they ought to be able to produce better results than going via XLSX).<br />
2. If you can do it in your report design then it ought to work for my emitter, but there is nothing I've done to make it easier for you.<br />
In theory you can rewrite most of your report in the early event handlers, so you could get the data and modify the appropriate cells, but it would be pretty ugly.<br />
I recommend starting a new thread (so you don't get ignored by people not interested in Excel output) and detail what you are trying to achieve (and why).<br />
<br />
Jim<br /></p></blockquote>
<br />
<br />
Hi Jim,<br />
<br />
Thanks for the info. Also can i freeze pane in excel report. I am not able to figure out any option in BIRT open source as well as in any emitter.<br />
<br />
Regards,<br />
Ashish