Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

import dat from .xls file

Posted on 2009-07-10
2
Medium Priority
?
505 Views
Last Modified: 2012-05-07
Is it possible to import data from .xls file into DB2 tables.
0
Comment
Question by:jsaravana
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 46

Expert Comment

by:Kent Olsen
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:
Dave Ford earned 500 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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

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…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

660 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