In this newsletter, I've published several articles that deal with reading Excel spreadsheets by using a combination of RPG and Java. Recently, Giovanni Perotti of Easy400.net has taken my work and turned it into a utility that makes it easy to convert an Excel spreadsheet to a database file in QTEMP and then subsequently read that file in your programs.
Giovanni's website provides a download where you can get the tool as a save file. You can then upload that save file to your IBM i and restore a library containing all of the source code. You run a REXX script that builds all the needed programs.
Once you've installed the tool, you'll have my service program, XLPARSER4, which you can use in your programs, the same way I discuss in my articles. Furthermore, you'll have Giovanni's command. Here's a screen shot of that command:
Convert an Excel spreadsheet (XLSCONVERT)
Type choices, press Enter.
.xls stream file . . . . . . . . XLS
Display the database file . . . DSPDBF *NO *YES, *NO
Print results . . . . . . . . . PRINT *NO *YES, *NO
Decimal places . . . . . . . . . DEC 2 0-5
Date columns . . . . . . . . . . DATECOL *NONE Number, *NONE
+ for more values
|
Giovanni's tool is open source and free of charge. Here are instructions for how to get it: