Solved

import dat from .xls file

Posted on 2009-07-10
2
498 Views
Last Modified: 2012-05-07
Is it possible to import data from .xls file into DB2 tables.
0
Comment
Question by:jsaravana
2 Comments
 
LVL 45

Expert Comment

by:Kdo
ID: 24822751
Hi jsaravana,

DB2 doesn't have direct support for importing Excel formatted files.  There are several 3rd party tools out there in the public domain that are supposed to handle these files, but I've never used them.

  http://www.download3k.com/Business-Finance/Office-Suites/Download-Excel-IBM-DB2-Import-Export-Convert-Software.html

  http://www.softpedia.com/get/Office-tools/Other-Office-Tools/Excel-IBM-DB2-Import-Export-Convert-Software.shtml


Probably the easiest (and sure to work) method would be to save the spreadsheet as a CSV file.  The DB2 IMPORT utility supports CSV files so importing it is trivial.


Good Luck,
Kent
0
 
LVL 18

Accepted Solution

by:
daveslash earned 125 total points
ID: 24824058

Greetings jsaravana,

There are many ways to accomplish this. Kent's suggestion of CSV works well. Depending on which flavor of DB2 you're using, you may have to use that flavor's importing tool. ( It's CpyToImpF on DB2 for i )

Alternately, I frequently use MS Access as an intermediary. I can easily suck in the Excel data into Access. Then, I can use ODBC linked tables to write the data into DB2.

I probably use that method the most frequently.

Another method involves using the Export function in MS Access. That works, and it's blindingly easy, but I usually have to massage the resulting DB2 table significantly after it gets there.

HTH,
DaveSlash
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now