Midrange News for the IBM i Community


Posted by: Jeff Masak
IT Developer
The Boldt Co
Appleton, WI
Convert Spoolfile to Excel
has no ratings.
Published: 20 Apr 2012
Revised: 23 Jan 2013 - 1585 days ago
Last viewed on: 26 May 2017 (3384 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

Convert Spoolfile to Excel Published by: Jeff Masak on 20 Apr 2012 view comments(5)

Looking for away (programically) to convert a spoolfile (*SCS Spoolfile) to Excel.  My users would like to be able to run a job to create the spoolfile and then have it automatically converted to Excel.  Any help is appreciated.  I have experimented with CPYTOIMPF, and have run into issues with columns in excel.  Thanks  Jeff

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: DaleB
Premium member *
Reading, PA
Comment on: Convert Spoolfile to Excel
Posted: 5 years 1 months 6 days 10 hours 59 minutes ago

Don't use any ourselves, but there are ads in the various magazines / e-zines for products that do this.

My users generally ask "can we get this in a CSV" instead of, or in addition to, the printed report. We just rework the program to do different output. I tend to write the CSV directly, but I suppose you could write to a temporary table and use CPYTOIMPF.

Posted by: jmasak
Premium member *
Appleton, WI
Comment on: Convert Spoolfile to Excel
Posted: 5 years 1 months 6 days 10 hours 43 minutes ago

Thanks Dale, when you say you write to the CSV directly, how do you do that?

Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: Convert Spoolfile to Excel
Posted: 5 years 1 months 6 days 10 hours 39 minutes ago

Jeff, the cvtToCsv procedures in RPG xTools will allow you to write directly to a CSV file. Those subprocedures are:

  • openCSV
  • writeCSV
  • closeCSV
Posted by: jmasak
Premium member *
Appleton, WI
Comment on: Convert Spoolfile to Excel
Posted: 5 years 1 months 6 days 10 hours 35 minutes ago

Bob, we don't have RPG xTools at our location.  What does that cost?

Posted by: ask2179
Premium member *
Comment on: Convert Spoolfile to Excel
Posted: 5 years 1 months 6 days 10 hours 21 minutes ago

Yes write into temporary file and using CPYTOIMPF place the CSV file into IFS folder. Then map the drive into local drive. So user can access the local drive and take the csv file.

 

Thanks

Senthil A