I'm no expert on poi, but your prototype takes only one parameter, anchor, and your method call is passing two parameters. The java code is going to see what's passed by the prototype, which is just one parameter. The message is telling you that there's no overload of createCellComment in the HSSFPatriarch class that takes HSSFClientAnchor as a single parameter.
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of tim.dclinc@xxxxxxxxx
Sent: Monday, March 11, 2013 7:19 PM
To: Midrange Systems Technical Discussion
Subject: creating XLS cell with comments error
im trying to create an xls cell with comments and getting the following error. Any help would be appreciated as always.
Error.................
Cause . . . . . : RPG procedure $ in program NTCOLL/$ received Java
exception "java.lang.NoSuchMethodError:
org/apache/poi/hssf/usermodel/HSSFPatriarch.createCellComment(Lorg/apac"
when calling method "createCellComment" with signature "(Lorg.apache.poi.hssf.usermodel.HSSFClientAnchor;)Lorg.apache.poi.hssf.user
model.HSSFComment;" in class
"org.apache.poi.hssf.usermodel.HSSFPatriarch".
RPG CODE...................
H DFTACTGRP(*NO) BNDDIR('HTTPAPI':'QC2LE':'TSWPGMS')
/copy xxsl/allsrc,hssf_h
D wb s like(HSSFWorkbook)
D sheet s like(HSSFSheet)
D row s like(HSSFRow)
D cell s like(HSSFCell)
D style s like(HSSFCellStyle)
d factory s like(SSCreationHelper)
D Drawing s like(HSSFPatriarch)
D anchor s like(HSSFClientAnchor)
D comment s like(HSSFComment)
/free
hssf_begin_object_group(100);
wb = new_HSSFWorkbook();
factory = SSWorkbook_getCreationHelper(wb);
sheet = hssf_NewSheet(wb : 'COLOR');
Row = HSSFSheet_createRow(sheet: 0);
drawing = HSSFSheet_createDrawingPatriarch(sheet);
anchor = new_HSSFClientAnchor( 0: 0: 0: 0: 0: 0: 0: 0);
comment = HSSFPatriarch_createCellComment(drawing:anchor);
style = HSSFWorkbook_createCellStyle(wb);
HSSFCellStyle_setFillForegroundColor(style: HSSFColor_8);
hssf_text(row: 0: '01' : style);
hssf_save(wb: '/tmp/xxx/a.xls');
hssf_end_object_group();
*inlr = *on;
/end-free
HSSF_H CODE................................
D HSSF_COMMENT_CLASS...
D C 'org.apache.poi.hssf.usermodel-
D .HSSFComment'
d HSSFComment S O CLASS(*JAVA: HSSF_COMMENT_CLASS )
D HSSFPatriarch_createCellComment...
D PR like(HSSFComment)
D EXTPROC(*JAVA
D : HSSF_PATRIARCH_CLASS
D : 'createCellComment')
D anchor like(HSSFClientAnchor)
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.