× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



There have been a few items on this topic in the last year. Without 
purchasing a third-party product, there are a few ways to accomplish this. 

1) Rather un-elegant, but do-able is to output the data on the report to a 
file, and use ODBC, or Client-access file transfer to get it to the user's 
PC

2) Construct your report into an HTML TABLE. If you know HTML, this is not 
difficult, and I can post some examples if you want to go this way. I have 
done this more than any other method, because it is pretty simple. It 
involves creating and opening a file on the IFS, and writing HTML code to 
the file, including the HTML TABLE for the report. The file gets named with 
an .XLS extension, and Excel opens the file just as if it were a worksheet 
(even though the file contains HTML, excel does the translation, 
transparently to the user). If the user is on a PC using client access 
(aren't they all nowadays), you can use STRPCO and STRPCCMD to actually open 
the file up on their PC while in-session (user's love that)

3) You can use the Java POI classes. I have received some training on this, 
and will probably attempt it on my next report program, but I don't have any 
examples on this one. It is a little more complex (not too much), but there 
are many advantages. You are creating a real Excel file using POI, not an 
HTML Table bait-and-switch technique, so you can use more Excel-specific 
features, such as cell formatting, mutliple sheets (I think),etc. 

This has been the one feature I have added to my bindle-stiff this year that 
my users have ranted about around the water-cooler the most. 

Good Luck! 

On 7/27/05, Douglas W. Palme <dpalme@xxxxxxxxxxx> wrote:
> 
> We are needing to export some of our reports to excel, I would appreciate
> any feedback from those of you who have accomplished this either with 
> rpgle
> coding, third party tools, or something else that might be beneficial to 
> us.
> 
> 
> 
> If you bought, it was hauled by a truck - somewhere, sometime.
> 
> --
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
> 
> 



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.