Transfer Data from AS/400 to Excel

Hi all

I need some step by step guidance on this one.

I have got to the stage where I see the iseries add on in Excel.

Could someone please give me some instructions how to transfer data now please?

Many thanks!
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi James,

I'm guessing you're talking about "cwbtfxla.xll".  I used it a while ago, but found it easier (for me at least) to use other methods of getting data (running a query then using the iSeries Navigator software to move the output to my computer from the AS400 outq).  I still have that add-in, so I'll try to give you some basic instructions on how to use it (though I'm by no means an expert with it).

On the Client Access toolbar that gets added, click the "Transfer Data from iSeries" button.  For the Transfer Request field, choose New, and choose a starting row/cell. Click OK.
Choose the iSeries server you want to get data from, and click Next.
Choose the library/file you want to get data from, click next
The 'Data Options' button is where you define the query/what you want to retrieve. Format Options controls the format of the data, and I almost never changed the run-time options.  Click next when done with that screen
If you want to save this data transfer information (if you need to do it more than once), you can do it on the next screen or just click next from there if you don't need to save it (not the information, just the transfer setup).
Click Finish

Dave FordSoftware Developer / Database AdministratorCommented:
I used to use the "Transfer Data to iSeries" button, but I've found it much more flexible to use Excel's built-in capability to import from an ODBC data-source.

- In Excel, click "Data", then "Import External Data", then "New Database Query"
- Select the appropriate previously created ODBC data-source, click "OK"
- Sign on to the '400 on the resulting pop-up
- Select the appropriate table, press the ">" button, and click "Next" 3 times
- Finally, click "Finish", then "OK"

The data will then be returned into Excel with all the appropriate column headings.

jim25Author Commented:
Thanks guys so much for information.

Sorry to be thick but as Matt will tell you Dave I am new to all this stuff but trying to learn fast!

I have a few questions:

I have reports on my print queue which I would like to transfer to excel.

I have managed to find out that the library for them is QUSRSYS


I can not see QUSRSYS to select in the procedure Matt outlined.

Dave what do you mean by "previously created ODBC data source"?

Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Dave FordSoftware Developer / Database AdministratorCommented:
Ahh, I misundertsood slightly. I had assumed you're looking for data in the database. But, it seems you're looking for data in spool files.

If it were me, I'd use iSeries Navigator (a.k.a. Operations Navigator) and drag the spool files to my PC. (click My Connections, your box name, Basic Operations, and Printer Output)

Once it's a text file on your PC, you can very easily import it into Excel.


I use the iseries navigator as well to do this, it even knows your personal outq based on login name. It is something your help desk should be able to install for you as I believe it is software that comes with the iseries emulator.

The AS400 systems should also have an option of sending it to disk.  If it doesn't work, and you can't get the navigator software, try setting up a shortcut that points to:

You may need to try removing the \ROOT (and/or possibly the QSYS.LIB), as well as change the location of the server, but I have done that in the past.  If you have any problems with it, you should probably (again) contact your IT dept to see if they have any ideas.

MurpheyApplication ConsultantCommented:
Hi Jim25,

I think you have a lot of information now, but there is one more option.
Create an HTML file on yout as/400 then you have full controll over the Excel layout
copy it to your PC with extention .XLS and excell will accept it as a normal excelfile.
here some tips.

User the <COLGROUP> to set the column width.
<TABLE border="0" cellpadding="0" cellspacing="0">
<COL width=70 align="Right">
<COL width=200 align="Left">
<COL width=50 align="Center">
<TR><TD>123</TD><TD>example Line 1</TD><TD>Yes</TD>
<TR><TD>Abc</TD><TD>example Line 2</TD><TD>Yes</TD>
<TR><TD>XYZ</TD><TD>example Line 3</TD><TD>Yes</TD>

One problem is that the grid-lines of excel disapear.
But I did some investigation and found the XML code to get these lines also
(I know there is an HTML equivalent that I don't have but I will find that.)

So by adding this to at the begining of your file, you also get the gridlines

<html xmlns:x="urn:schemas-microsoft-com:office:excel">
<!--[if gte mso 9]><xml>

Please let me know if you need the HTML equivalent for older excel versions then office 2000

jim25Author Commented:
Hi guys thanks for all your info.

How do I now if iseries navigator is installed or not? Is it found in excel or the as400 emulator?

Neither.. my navigator program is located at  C:\Program Files\IBM\Client Access\cwbunnav.exe, and in the start menu in Programs / IBM iSeries Access for Windows / iSeries Navigator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jim25Author Commented:
Matt you are a legend among men!

I found the programme! And it is running!

You always seem to explain things so clearly and simply! A sign of a great mentor!!!!

Ok I am going to play around with this iseries navigator and get back to you!
If you have any control over what the as/400 is exporting, Murph's html suggestion is a great one!  If you can get the report to be generated in that text format, you would only have to click/drag the file from the Navigator then rename as .xls, simple as that.
jim25Author Commented:
Hi Guys

I am unable to drag the file contents out! Any ideas why?
MurpheyApplication ConsultantCommented:
Probably a security setting in the AS/400
jim25Author Commented:
How do I find out what it is and how to change it?
At my company, anyone with Navigator is able to click/drag the files.  Are you trying to drag something that has a .FILE extension? On my as400, the libraries have .LIB extensions, the folders of the library have .FILE extensions, and the files themselves have .MBR extensions.  If I try and drag a .FILE I just get a shortcut to the directory, but dragging the .MBR works well.

On one of our servers, after much testing just now, some folders have a different icon (looks like an outstretched hand from the side, holding the folder at the bottom) if the contents can be dragged.  But on one of my servers the hand icon isn't there at all and I can drag whatever I wish.  You will have to talk to your IT department or the AS400 admin about gaining rights if you've verified you're dragging the first thing and it still isn't working.
jim25Author Commented:
I did manage to drag some of the files! I must have had a dodgy connection or something!

How do I access other files stored on my as/400 programme?
Where are your other files located? You should be able to find them in the file system
jim25Author Commented:
Oh right I shall have a rummage around!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
IBM System i

From novice to tech pro — start learning today.