Create Excel from AS/400 with multiple sheets

2505 pts.
Tags:
AS/400
AS/400 CSV
Microsoft Excel
Physical Files
I have a requirement to generate an excel from 2 different PF as 2 sheets in a single Excel file. I have created single sheet excel using CrtCsvDta command. Please help me to figure out to generate multi-sheet Excel from AS400.

Software/Hardware used:
As400

Answer Wiki

Thanks. We'll let you know when a new response is added.

CrtCsvDta is not an IBM command. Probably something written by an in-house programmer.

To answer the original question. Yes, you can do what you want on the AS400. There is no single native command to do this.

You need to write code to output to the IFS.

If you goggle SCOTT KLEMENT and find his web page, you will be able to find examples of what to do. It will take some time to learn.  

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • philpl1jb

    CrtCsvDta creates a csv file, it cannot create two sheets.

    The level of complexity to do what you want is considerably greater.

    49,730 pointsBadges:
    report
  • RamvishakRamesh
    That means it is possible?
    2,505 pointsBadges:
    report
  • philpl1jb

    Yes.

    You'll need to write an RPGLE program, and as Charlie Brown said you will need to find material and downloads from SCOTT KLEMENT.  This will allow you to write each value to any cell in the spreadsheet and use pratically all of the EXCEL formating. 

    49,730 pointsBadges:
    report
  • TomLiotta

    There are two general ways to create Excel spreadsheets on AS/400s, and CRTCSVDTA is not one of them. CRTCSVDTA creates .CSV files, not Excep spreadsheet files. Excel simply allows the importing of data from .CSV files into Excel spreadsheets.

    The first way is to obtain technical specifications for Excel spreadsheet files and start coding programs that write data in that format. That's a pretty ugly way to do things, but you'd have complete control over what could be done. Perhaps you could look at some open source projects that create compatible file formats and port them to your AS/400.

    Easier would be to look up Scott Klement's examples of using Apache POI - the Java API for Microsoft Documents with RPG, as previously mentioned. Or if you're more familiar with Java, just use POI directly.

    Tom

    125,585 pointsBadges:
    report
  • iEXL
    <Vendor>

    There is a product called iEXL which will give you the results you require. This is a commercial product, so chargable. However it could save you a considerable amount of development time. Please see iEXLSOFTWARE.COM for more information. 
    10 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following