I am a newbie in Java and the more I learn the less I realize I know :}
Preaching to the choir on that one :-)
You mentioned that you had adjusted the interface to do more on the Java
End
(custom programming in Java) which sound like it had a dramatic impact on
performance.
So I went and peeked at the code and it is almost entirely in Java and is
simply invoked from an ILE program (RPG or CL).
Is this something you could share?
Not without being worried for my life [grin] but I can explain where I had
the issue and you can determine if your case might be the same. Below is
some Java code where I create some re-usable styles vs. creating new styles
for each cell (which is what I was doing before and that caused similar
symptoms to what you are having). In this case the style is named hdrMain
and is being reused in method createHdr many times over vs. doing a
wb.createCellStyle() for each. How are you currently creating your cell
styles?
public class MyReport {
HSSFWorkbook wb = new HSSFWorkbook();
HSSFCellStyle hdrMain = wb.createCellStyle();
public void setupCellStyles() {
HSSFFont fontHdrBig = wb.createFont();
fontHdrBig.setBoldweight(BOLD);
hdrMain.setFont(fontHdrBig);
hdrMain.setAlignment(ALIGN_LEFT);
}
...
private void createHdr(){
HSSFRow row = sheet.createRow((short) 0);
createCell(wb, row, 6, hdrMain, gReportTitle.toString() + "
Performance Report");
row = sheet.createRow((short) 2);
createCell(wb, row, 0, hdrMain, organized);
row = sheet.createRow((short) 3);
createCell(wb, row, 0, hdrMain, "Account: " + getAcctName(acctNbr));
...
}
private void createCell(HSSFWorkbook wb, HSSFRow row, int column,
HSSFCellStyle cellStyle, String value) {
HSSFCell cell = row.createCell((short) column);
cell.setCellValue(value);
cell.setCellStyle(cellStyle);
}
}
HTH,
Aaron Bartell
http://mowyourlawn.com
On Wed, Sep 10, 2008 at 10:58 AM, Andy Hautamaki <ahautamaki@xxxxxxxxxxxxxxx
wrote:
Aaron;
I've used Scott Klements excellent tutorials and examples for creating
Excel
Spreadsheets using the RPG/JAVA
I am a newbie in Java and the more I learn the less I realize I know :}
You mentioned that you had adjusted the interface to do more on the Java
End
(custom programming in Java) which sound like it had a dramatic impact on
performance.
Is this something you could share?
Thanks
Andy Hautamaki
As an Amazon Associate we earn from qualifying purchases.