Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Urgent!! Problem Importing data from .xls file

Author  Topic 

skaluva
Starting Member

17 Posts

Posted - 2002-05-30 : 10:45:54
Hi There;

I have been trying to create a DTS package to transform data from an Excel work book to a SQL Server 2000 table.
I created a connection for Excel file (Conn1) and one connection to SQL Server table (Conn2). And trying to createa Data Transform task with source as Conn1 and destination as Conn2. But when I am designing this task, it is showing me a list of sheets available in Excel workbook and asking me to choose any one sheet out of the available sheets. But, I may not be knowing how many sheets, I will be having in my workbook and what may be the names of the sheets.

Please help me finding a way to handle this situation. All I will be knowing is the name of the excel file and its location and SQL table into which the DTS will be pumping the data.

Thanks in hand,

-- Sree :(
ksreedhar99@hotmail.com

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2002-05-30 : 10:51:46
quote:
...All I will be knowing is the name of the excel file and its location and SQL table into which the DTS will be pumping the data....


That's just not enuff. You need to know which sheet the data will be on and, more importantly, which columns will contain which data . . .

push comes to shove you can write a activex scripting task to go out to the file and figure these things out. then the dynamically set up the source of your datapump task and the transfers. . .that's a lot of work.

<O>
Go to Top of Page

dataphile
Yak Posting Veteran

71 Posts

Posted - 2002-06-03 : 11:04:20
No. Select a sheet in the Source tab and click preview.
Alternatively, give the sheets descriptive names pick the right one the first time and click preview just for fun.
You are welcome to put descriptive column headers in the sheets as well.

It's a pleasure.

Go to Top of Page
   

- Advertisement -