There are a number of ways to go, here are a few.
- Create a comma delimited file .cvs – easy CPYTOIMPF can either write a comma delimited file to a flat as/400 file that you can send to the user or write a comma delimited file to a folder on the ifs (the output file should be named with .cvs) When the user goes to open the .cvs program it will open in EXCEL provided it doesn’t exceed 65000 rows.
- I believe that Navigator has an extract tool
- The user can create a query in Excel to access files on the 400
- Write an RPGLE program using java tools (HSSF) to actually write an excel worksheet – cell by cell
This entails some serious programming and a lot of run-time overhead.
I use option 4 all the time and have not noticed any serious run-time overhead.
The discussion above assumes that you have a file of the data. You may be able to create this file using
query on the 400. Or that Excel query capability might be good for you. But option 4 is definitely not on the table for a newbie. So the place to start might be with the wrkQRY command, but you will need to know the files and fields that contain the data that you are currently using.
If you use Ops Navigator, there is an “add-in” for excel which lets you import and export directly from the i-Series.
If you want to go beyond creating a .csv file, I would recommend a series of articles Scott Klement wrote on the subject:
He also has example programs which you can download from a site mentioned in the articles. I used them to create programs that produce .xls files that my users are quite pleased with.