xls.files

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
vj_meghani
Participant
Posts: 7
Joined: Fri Oct 29, 2004 10:48 am

xls.files

Post by vj_meghani »

i am trying to load files from excel but not able to load it. Can anyone help me out in this.

I have TNS listner prob too. how can resolve this porblem.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

TNS needs to be resolved with sqlplus. If you get on the server and use sqlplus from there and it works then it should work in DataStage. If not then your Oracle home variable is wrong or one of the other Oracle variables.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard! :D

I note that you are on Windows, this explanation relates to that platform.

To extract data from Excel, the data must be in columnar format with column headings. Set up an ODBC data source using Microsoft ODBC driver for Excel as the driver, and select the workbook that you wish to access.

In DataStage Manager, import the "table definition" from this data source, making sure to check the "system tables" check box. All worksheets are reported by the ODBC driver as system tables; you will get "$" prefixing the name of each. If you only select the one "table" (your worksheet) the Detail and View Data buttons will be enabled, which allows you to test the connectivity.

Once the table definition has been imported, you can use an ODBC stage in a DataStage job to extract the data from the worksheet.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
metabill
Premium Member
Premium Member
Posts: 26
Joined: Wed Aug 27, 2003 9:55 am

Post by metabill »

(Using DataStage 7.5 on WinXP/SP2)

Even after following the instructions in the previous post, I still cannot import the table definitions from the sheets in an Excel 2002 worksheet file. The file contains 3 tabular sheets, all with column headings on the 1st line. I've created an ODBC system DSN (MS Excel driver) pointing to the file. When I attempt to use DataStage Manager to import the ODBC Table Definitions, I only get the error "No match found".

FYI: I do not see any option in the Import dialog to check System Tables; perhaps it would come after the point at which I'm getting the error.

Thanks in advance....

-Bill
metabill
Premium Member
Premium Member
Posts: 26
Joined: Wed Aug 27, 2003 9:55 am

Post by metabill »

It apears I have solved my own problem....

After taking another look at the Import dialog, I noticed a Filter button. After clicking on that, I did see the Include System Tables checkbox. Selecting that and proceeding resulted in the table definitions being loaded OK.

-Bill
mhester
Participant
Posts: 622
Joined: Tue Mar 04, 2003 5:26 am
Location: Phoenix, AZ
Contact:

Post by mhester »

Make sure that when you defined the DSN that you configured it properly and are pointing to a valid Excel document. Also, when you choose import from the manager you should see a button next to your username and password named - Filter >> Choose this option and you will then be presented with more options with one being - "Include System Tables".

Once you do this and choose OK, you should see entries for each tab or sheet from your document. You can then choose to import all none or 1.

Hope this helps

Regards,
vj_meghani
Participant
Posts: 7
Joined: Fri Oct 29, 2004 10:48 am

Post by vj_meghani »

Hi.
I upgrade Os to XP. I am able to get the data of XLS that is of only one file that i hv show in DSN.

How can i import all file together or how can i add all file together. Is there any way.

thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You need a separate DSN pointing to each workbook (XLS file).

Within a workbook, each worksheet (tab) is reported via DataStage metadata import as a "system table". It must have column headings and a proper columnar structure to work successfully as a data source.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post by ketfos »

Hi,

We can save the Excel file has .csv
Then read the file in sequential file stage and load it.

This will be simple and claen.

Ketfos
Post Reply