|
Arthur, did you check whether you have sufficient rights to the XLS file? I include the following in my programs that read spreadsheets: d ExcelName s 1024a d Access pr 10i 0 ExtProc('access') d * value options(*string) d 10i 0 value /free Select; When access(%trim(ExcelName):0) < 0; Msgdta = 'Stream file not found.'; SndPgmMsg(MsgDta); When access(%trim(ExcelName):4) < 0; Msgdta = 'No read access to stream file.'; SndPgmMsg(MsgDta); Other; /end-free HTH, Peter Colpaert Application Developer PLI - IT - Kontich, Belgium ----- Yoda of Borg are we. Futile is resistance, assimilated will you be. ----- Arthur.Marino@xxxxxxxxxxxxxxxx Sent by: rpg400-l-bounces@xxxxxxxxxxxx 21/09/2006 15:57 Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> cc Subject Excel/POI - Here We Go Again All, Now that I've got an actual s/sheet back from a salesman in the field, the problems begin again. The HSSF_OPEN proc is failing as below. The statement is: book = HSSF_open(/bq_budgets/inbound/dayton/B7_DAYT_S001_STEVETWAMLEY_C7.xls); (This s/sheet definitely exists in the IFS. I used a CPYFRMSTMF to copy it and it worked fine.) Strangely, the 'open' returns an address of ZERO for 'book' but does not halt. The exception occurs only when the HSSF_GETSHEET fails because the 'book' address is 0. Can anyone please help? Management believes I can read in all 295 s/sheets we sent out!! (And I don't want to disabuse them of the notion). Thanks. Note the odd wording in the "Unable to construct record instance" line. Additional Message Information Message ID . . . . . . : RNX0301 Severity . . . . . . . : 50 Message type . . . . . : Escape Date sent . . . . . . : 09/21/06 Time sent . . . . . . : 08:37:22 Message . . . . : Java exception received when calling Java method. Cause . . . . . : RPG procedure HSSF_OPEN in program SOUTHERN/HSSFSRVPGM received Java exception "org.apache.poi.hssf.record.RecordFormatException: Unable to construct record instance, the following" when calling method "<init>" with signature "(Lorg.apache.poi.poifs.filesystem.POIFSFileSystem;)V" in class "org.apache.poi.hssf.usermodel.HSSFWorkbook". Recovery . . . : Contact the person responsible for program maintenance to determine the cause of the problem. Technical description . . . . . . . . : If the exception indicates that the Java class was not found, ensure the class for the method is in the class path. If the exception indicates that the Java method was not found, check More... Press Enter to continue. Arthur J. Marino Southern Container Corporation (631) 231-0400 x133
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.