Solved

import dat from .xls file

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

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 (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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

707 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

17 Experts available now in Live!

Get 1:1 Help Now