Page 1 of 1

Loading excel files

Posted: Thu May 01, 2008 9:37 am
by mydsworld
Please let me know the method of loading an xls doc in DS.Can it be treated as sequential file stage, then with what delimiter.

Or it requires a DSN to be created,in that case which stage to use.

Thanks

Posted: Thu May 01, 2008 9:46 am
by OddJob
As far as I am aware, and in line with what I've done in the past, you'll need to save the spreadsheet as csv format and import using a sequential file stage.

Be careful that the correct number of columns get exported and that the data itslef doesn't contain commas!

Because of these gotchas, I have written a bespoke macro to ensure the correct columns are exported and with the correct format etc.

Posted: Thu May 01, 2008 9:49 am
by mydsworld
I need to load data from xls without converting them into csv.

If I need to create a DSN for xls, I hope it should be at the server and in case of Unix server, how do I create DSN for xls.

Also, what if the xls contain any macro.

Thanks

Posted: Thu May 01, 2008 9:52 am
by ArndW
You cannot link directly to ODBC on UNIX without {buying and} installing 3rd parts software.

Posted: Thu May 01, 2008 9:55 am
by OddJob
Yep, you'd need an Excel ODBC driver for your flavour of Unix - don't know if these exist.

As for the macros, you would lose them in the csv export.

I think the only thing left is to find out how Excel holds its data and write a bespoke extract tool, or try and find something to do that for you.

Posted: Thu May 01, 2008 10:01 am
by OddJob
Try googling 'excel unix' there are plenty of people trying to do the same thing, and possibly have solutions.

Try this link for starters... http://www.ibm.com/developerworks/linux ... /l-pexcel/

Re: Loading excel files

Posted: Fri May 02, 2008 11:41 am
by vinnz
There are some non-free unix odbc drivers for Excel available.
For example - http://www.easysoft.com/products/data_a ... index.html

If converting to csv becomes acceptable, maybe your admin can install this utility for you in case your OS doesnt already have it.

http://www.linuxmanpages.com/man1/xls2csv.1.php

As Oddjob mentioned there may be other alternatives that you can find using google.