dbTalk Databases Forums  

Re: DTS Exports to Excel

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Re: DTS Exports to Excel in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Douglas Laudenschlager [MS]
 
Posts: n/a

Default Re: DTS Exports to Excel - 06-15-2004 , 03:32 PM






Well, the short answer to your question as you expressed it would be that
the name appended with the $ represents the worksheet, as opposed to the
named range with the same base name.

If you can use DTS to create a destination worksheet with a name like your
users want, and to export successfully, I'd script out that package as VB
and examine the generated code. You may want to check the "drop and
recreate" option to make sure you see the CREATE TABLE statement in the
code; otherwise it's just running at design time.

-Doug

--
Douglas Laudenschlager
Microsoft SQL Server documentation team
Redmond, Washington, USA

This posting is provided "AS IS" with no warranties, and confers no rights.

"alaspin" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have VB.NET code written to create a DTS package "on the fly" - this
works fine...
It is designed to export stuff from SQL Server to MS Excel 2000 format

My users (grrrr) say they want the worksheets in Excel to have names
including spaces and brackets ().

If I do the obvious - wrap the tablename in [] - it doesn't work, giving a
JET create table error...

A quick trawl through MSDN gives me "DTS creates BOTH a named range AND a
worksheet BUT uses the names range unless you tell it otherwise"

OK. Good. But does anybody know HOW I tell it otherwise?

(Remember I'm doing this in code)

TIA

alaspin (AT) yahoo (DOT) com





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.