Filuphaze
325 pts. | Mar 6 2009 6:22PM GMT
Thanks Yorkshireman. I tried your suggestion of using the STRPCO and that works great, however all that does is open Excel with an empty document. Is there a way to open the file just created in Excel?
Dave59
45 pts. | Mar 9 2009 8:24AM GMT
As with most organisations we have a myriad of people who want excel files. What I tend to do is have programs scheduled to collect the data at set times and export to a simple excel file in the IFS (normally before they start work). The Excel spreadsheets have a start up macro to import the data. That way they don’t even need to touch the iSeries (other than have an appropriate connection).
Don’t know if that helps or not.
Dave
Littlepd
500 pts. | Mar 9 2009 6:32PM GMT
A few years ago, my employer (an IBM business partner & consulting firm) embarked on a path toward making excel workbooks an interface to DB2 as an alternative to 5250. We developed a set of programming standards and some baseline procedures written in VBA to run as macros inside of spreadsheets. We call them eXLerated(TM) reports.
Using VBA and the OLE DB provider that comes with iSeries Access for Windows, we create forms for the users to select report criteria from drop-down lists, radio buttons, etc., which will be formatted into an SQL statement that can be run against the DB2 database. The results are returned to the VBA code, which fills in the worksheets.
This method can also be used with any database for which you have an OLE DB or ODBC provider.
Michael
Yorkshireman
3200 pts. | Mar 11 2009 8:27AM GMT
If you check the documentation for Excel, it accepts a parameter, which is the name of the file to open.
thus
Excel.exe /C:file name.csv
- or some such - can’t remember the syntax - something PC, so weird.
that will start the program and load the file.
Filuphaze
325 pts. | Mar 11 2009 1:17PM GMT
Thanks again Yorkshireman. That did the trick. Thanks to all for your input. That PC stuff is always tricky.






