How to access tables of DB2 in Excel

Dear Experts,

Could you please help to know how to access tables from DB2/AS400 in MS-Excel to use PivotTable.

Please give me step by step process.
Syed Shareef AhmedSenior System AnalystAsked:
Who is Participating?
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.

Kent OlsenData Warehouse Architect / DBACommented:
Hi Syed,

The process can vary a bit depending your desktop environment, but it will go something like this:

-  Open the Control Panel (assuming that you're running a Windows desktop).
-  Open 'Administrative Tools'
-  Open 'Data Sources (ODBC)
-  Under User DSN, Select 'Add' on the right side of the dialog box.
   All of the drivers installed on your desktop will be displayed.
-  Select the IBM DB2 ODBC DRIVER driver.
   If no DB2 driver exists on your desktop, you'll need to install one or user a generic driver.

Once you've create the DSN entry, you can link the data from Excel with 'External Data' / 'From Other Sources'.  Use the Data Connection Wizard or go straight to the DB2 DSN entry.



Good Luck!
Kent
0
Dave FordSoftware Developer / Database AdministratorCommented:
When it comes to DB2, Kent is the premiere expert, and I would trust whatever methodology he suggests.

Just in case you have problems with that methodology, I've usually had more success importing my DB2 data into Microsoft Access first, massaging it there, and exporting to Excel.

You'll still need a valid ODBC data-source, but from within Access, you click the "External Data" tab, the "ODBC Database" button, and select "Import Source Data into new table". It'll then present a list of ODBC data-sources from which to choose. Once that's chosen, it'll present a list of tables to import. Just select the one you want and click OK.

HTH,
DaveSlash
0
Syed Shareef AhmedSenior System AnalystAuthor Commented:
Hi Kent & DaveSlash,

Thanks for the steps provided and sorry for my late response.

Please find attached of two files one for ODBC setting I have done, another for trying to extract data in Excel from DB2.

If you look my second attached file, I could not see the libraries and tables i want to access.

I don't know where I am missing.
ODBC-Setting.docx
Excel-Data-Conn-Wizard.docx
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

Dave FordSoftware Developer / Database AdministratorCommented:
You'll notice in your ODBC settings that the "SQL default library" is set to QGPL. Change that to whatever schema (a.k.a. library) your tables live in. That's the quickest and easiest way.

Another option would be to change the "naming convention" in the ODBC to *SYS and specify all the relevant schemas in the "library-list" value.

HTH,
DaveSlash
0

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
Tomas Helgi JohannssonCommented:
HI!

As Kent mentioned you need to use the IBM DB2 ODBC DRIVER driver.
Make sure that you have the latest/newest version of DB2 Data Server Client or Personal Connect Client  that supports your DB2 Server.
Also make sure that that Driver and Office are BOTH 64 bit OR 32 bit versions.
Otherwise you have compatibility issues.

http://www-01.ibm.com/support/docview.wss?uid=swg21385217
https://www-01.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.qb.dbconn.doc/doc/t0008456.html
http://www-03.ibm.com/software/products/en/db2connect-pe


Regards,
     Tomas Helgi
0
Dave FordSoftware Developer / Database AdministratorCommented:
I think Kent (kdo) deserves to be part of the points-split.
0
Martin LissOlder than dirtCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
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
DB2

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.