Groups | Blog | Home
all groups > sql server dts > june 2004 >

sql server dts : Importing a specific Excel Sheet From a DTS Package



Thomas
6/29/2004 10:10:01 AM
Hey All,

I am trying to figure out how to Import a specific Excel sheet in an ActiveX Script

set conTextFile = pkg.Connections("Microsoft Excel 97-2000")
conTextFile.DataSource = DTSGlobalVariables("gv_FileFullName").Value
DTSGlobalVariables("gv_sheet").Value = GetSheet()

But i don't know how to assign the sheet to the connection object.

Any Ideas?

Allan Mitchell
6/30/2004 9:36:00 AM
OK So you have assigned the spreadseet itself to the DataSource object and
you now (if this is a source) need to assign the sheet inside the workbook
to the SourceObjectName property of the DataPump task.

Have a look at examples of doing this here

Changing the DataPump Source and Destination Tables
(http://www.sqldts.com/default.aspx?213)

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
[quoted text, click to view]

AddThis Social Bookmark Button