|
Darrell, If you're using the prototypes from Scott's article, the 3rd param of "hssf_formula" calls for an RPG "varying const" so you can use just about any RPG string of length 1024 or less. A jString from /qsysinc,jni is an entirely different critter of CLASS(*JAVA: 'java.lang.String'). During development I often use RPG character work fields to hold strings built with %subst and %trim rather than trying to feed values directly to a function. Makes debugging much easier... JK
-----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of DLee@xxxxxxxx Sent: Thursday, July 20, 2006 1:58 PM To: rpg400-l@xxxxxxxxxxxx Subject: Re: Poi linking to other spreadsheets JK; Thanks for the reply. I have made it work hardcoding the formula. I like the code you sent. gwp02_c = hssf_cellname( rowcount: 2)gwp12_c = hssf_cellname( rowcount: 12)somestr = + 'sum(' + %trim(sheetname1) + '!' + gwp02_c + ':' gwp12_c + ')' + 'sum(' + %trim(sheetname2) + '!' + gwp02_c + ':' gwp12_c + ')' + 'sum(' + %trim(sheetname3) + '!' + gwp02_c + ':' gwp12_c + ')' + 'sum(' + %trim(sheetname4) + '!' + gwp02_c + ':' gwp12_c + ')'hssf_formula( row: 14: %trim(somestr): Numeric);Although I haven't been able to get it to work yet. I'm getting a Operands are not compatible with the type of operator error. I defined somestr as a jstring, I made sheetname1 a constant by initializing a d spec as inz('Naic10') I suspect I have the sheetname defined with the wrong data type. Appreciate your help. Darrell
As an Amazon Associate we earn from qualifying purchases.
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.