Copying Data to MS Excel

Microsoft
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

It seems everyone is suddenly downloading data to MS Excel. Could it be a tax-time issue? I don't know. But questions about how to do it have come up on the Web about a dozen times in the last month or so.

You have several methods for sending data to the PC so that it can be opened with a spreadsheet program, such as MS Excel. One way is to use Client Access (is that its current name?) to transfer the data to the PC; just specify the BIFF7 or BIFF8 file format for the output file. Another option is to use the ODBC plug-in for Excel that comes with Client Access. A third way is to write something yourself, which is advisable only if you have customized formatting or selection criteria. A fourth way is to use a third-party tool.

Third-Party Solutions

Several third-party tools copy data to MS Excel. One allows you to write directly to native Excel .xls format. This package from the Jakarta POI project is written in Java and can be integrated into RPG IV, provided you have strong Java and RPG IV subprocedure/prototyping skills.

If you're a hacker and can decipher MS technical specifications, consider looking at the OpenOffice document, which contains a lot of the specification. It's interesting but probably more than an RPG IV programmer cares to discover.

Another popular solution is ASC's SEQUEL. SEQUEL makes it painlessly easy to drill down to your data and then link it into MS Excel. You can view the data or email the resulting Excel file to someone on your network.

A product that is becoming one of the fastest-growing iSeries packages is Linoma Software's Transfer Anywhere. It allows you to convert data to Excel format and send it, as the name implies, just about anywhere. Transfer Anywhere also offers encryption and data compression if those feature are important to your shop.

Another choice is Goering's iExcelGen. This package allows you to create an Excel document using a CL command. It converts spool files and database files to Excel format.

If you need to convert data to Excel in batch, you may want to look at KemeTECH's ConversionSuite. This package is a collection of utilities that convert database files and spool files to MS Excel 2000 file format.

There is also Gumbo Software's Excel-erator. This package converts database files to Excel format and stores them on the IFS or allows you to send them as email attachments.

Finally, my own RPG xTools package includes a CPYTOCSV CL command that allows you to copy database files to CSV format. Obviously, CSV format is not native Excel format, and if you need Excel format, you should strongly consider one of the above packages. If all you need is CSV, however, RPG xTools has a very flexible set of subprocedures that allows you to either convert an entire file or selectively convert records to CSV within your RPG IV program.

Whichever method you choose, providing this capability to your users seems to be a critical requirement today. I recommend you use one of the packages listed above to make it easier. The Jakarta POI option should probably be your last resort. Unless you're skilled at integrating Java with RPG IV, using POI will probably cost your company much more in terms of time and value than simply licensing one of the third-party solutions.

Bob Cozzi is a programmer/consultant, writer/author, and software developer of the RPG xTools, a popular add-on subprocedure library for RPG IV. His book The Modern RPG Language has been the most widely used RPG programming book for nearly two decades. He, along with others, speaks at and runs the highly-popular RPG World conference for RPG programmers.

BOB COZZI

Bob Cozzi is a programmer/consultant, writer/author, and software developer. His popular RPG xTools add-on subprocedure library for RPG IV is fast becoming a standard with RPG developers. His book The Modern RPG Language has been the most widely used RPG programming book for more than a decade. He, along with others, speaks at and produces the highly popular RPG World conference for RPG programmers.


MC Press books written by Robert Cozzi available now on the MC Press Bookstore.

RPG TnT RPG TnT
Get this jam-packed resource of quick, easy-to-implement RPG tips!
List Price $65.00

Now On Sale

The Modern RPG IV Language The Modern RPG IV Language
Cozzi on everything RPG! What more could you want?
List Price $99.95

Now On Sale

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  •  

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: