Solved

import dat from .xls file

Posted on 2009-07-10
2
499 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
DB2 tablespace disk full error 33 1,128
db2 - u 3 233
replication of DB2 to MS SQL 43 463
IBM DB2 Query Manager and SQL Development Kit for i not available 7 272
November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
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 demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

773 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