× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.