Creating Excel (.xls and .xlsx ) spreadsheets directly from RPG

Eric Lehti

VIP Member
Are any of you Creating Excel (.xls and .xlsx ) spreadsheets directly from RPG?
We do not do so. We use the Excel Add-In "Transfer Data from IBM i" that is included with IBM's client access for Windows to download from data files.
Or I will produce a .csv file on a network folder with:
CPYTOIMPF FROMFILE(F55001B) +
TOSTMF('/QNTC/SCHROEDER/LIBRARY/rmaO/open_RMA.TXT') +
MBROPT(*REPLACE) STMFCODPAG(*PCASCII ) RCDDLM(*CRLF)
 
Some have been creating Excel spreadsheets directly from RPG for many years. e.g.
Scott Klement from the midrange forum shared with me his published articles " . . . about reading/writing Excel format in ILE RPG with help from the POI Java classes. :
http://www.scottklement.com/poi/ Others have written on this topic as well. (Beppe Costagliola, IIRC"

Sounds interesting to me.
 
We also use DRVtech's Spoolflex product to convert spooled reports to .xls format. This enables us to use the JD Edwards business logic embedded in RPG without needing to modify RPG code.
 
You can find other posted comments at midrange.com in the thread "Writing to Microsoft Excel format directly,without using CPYTOIMPF"
 
Yet another option is to use Monarch by Datawatch, which allows you to extract the "meat" from reports into Excel (automatically stripping page headings, etc. and putting the data into correct column types.)

I have no affiliation with Datawatch.
 
You can also drag and drop from the printer queue on iSeries Navigator and it will download the print file to your desktop in text format.

From: [email protected] [mailto:[email protected]] On Beh alf Of Eric Lehti
Sent: Friday, June 22, 2012 1:49 PM
To: [email protected]
Subject: Re: Creating Excel (.xls and .xlsx ) spreadsheets directly from RP G

Some have been creating Excel spreadsheets directly from RPG for many years . e.g.
Scott Klement from the midrange forum shared with me his published articles " . . . about reading/writing Excel format in ILE RPG with help from the P OI Java classes. :
http://www.scottklement.com/poi/ Others have written on this topic as well. (Beppe Costagliola, IIRC"

Sounds interesting to me.
 
Back
Top