× 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.






-------- Original Message --------

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)





As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.