ODBC connection to Excel files in different folder

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
hkotze
Participant
Posts: 35
Joined: Tue Feb 04, 2003 5:09 am

ODBC connection to Excel files in different folder

Post by hkotze »

Hi All

I need to read an excel file using odbc.

Easy. The problem is that every month the excel file is in a different folder. Setting up the odbc is easy pointing to a file that will stay in one place.

The work around will be to copy the new file with a dsexecute to the original folder overwriting or something. Then use the file as the source and delete it after completion. Succesfull or not.

Is it possible to setup the odbc so that you point it to the subdirectory of choice if the original is pointing to the root of the sub directory.

I'm not expecting an answer other than the work around.

Maybe another way of doing it.

It is not possible to save the file as an csv file as it contains multiple worksheets and I need to access all the worksheets. It is easier to define he named range and increase it if needed.

All help will be appreciated.

p.s.

Is their a freeware utility to convert an xls file to csv file from command line.
hkotze
Participant
Posts: 35
Joined: Tue Feb 04, 2003 5:09 am

Post by hkotze »

Hi

I found another way of doing it. I use the oledb stage and use the oledb for odbc. I then specify a connection string pointing to the folder containing the file. I created parameters and substitute the path with the parameter and it is working.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Can you provide a URL for the Excel parser from CPAN?
tonystark622
Premium Member
Premium Member
Posts: 483
Joined: Thu Jun 12, 2003 4:47 pm
Location: St. Louis, Missouri USA

Post by tonystark622 »

One of them is at:


Good Luck,
Tony
Post Reply