all groups > sql server dts > may 2004 >
You're in the

sql server dts

group:

DTS and Excel Named Ranges


DTS and Excel Named Ranges alaspin
5/28/2004 3:31:03 AM
sql server dts:
I'm using VB.NET to create a DTS package at runtime and write date to Excel 200

Quoting MSDN KB Article: 31995

"If you execute a CREATE TABLE statement against Excel, such as the statement that the wizard generates, this creates both a worksheet and a named range with the same name; however, DTS works with the named ranges unless you specify otherwise.

OK. So how does one "specify otherwise" then

I need to be able to create Worksheet names that include characters that are not allowed on "Named Range" names. Things like spaces for example

So I would like DTS to create the Worksheet but NOT the Named Range

I'm assuming it has something to do with the "create table" task I have or the "connection" to Excel itself but cannot find anything in MSDN on the subject

As it stands hte whole thing works - but the invalid characters are translated into underscores for both the Named Ranges and the Worksheet names

Any ideas

TI

alaspin@yahoo.co
Re: DTS and Excel Named Ranges Allan Mitchell
5/28/2004 12:28:14 PM
I believe the Named Range and the table as far as DTS is concerned are the
same thing as they both appear under the available objects of the
connection.
"A range name can contain letters, numbers, and underscores, but not spaces
or special punctuation characters. Moreover, it cannot be the same as a
normal cell reference. For example, "AA10" is not a valid range name
because "AA10" is the name of a normal cell reference (row 10, column
"AA")."


--
--

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]
statement that the wizard generates, this creates both a worksheet and a
named range with the same name; however, DTS works with the named ranges
unless you specify otherwise."
[quoted text, click to view]
the "connection" to Excel itself but cannot find anything in MSDN on the
subject.
[quoted text, click to view]
translated into underscores for both the Named Ranges and the Worksheet
names.
[quoted text, click to view]

AddThis Social Bookmark Button