Set the connection to the desired file name, and then create the sheet.
Sheets are analogous to tables, so you can use a create table statement
inside an Exec SQL Task that references the Excel connection. This will
force the file to be created as well if it does not already exist at
run-time.
Use the designer to help get the syntax right, but for an example-
CREATE TABLE `AdamAntTest` (
`RowNumber` Long ,
`EventClass` Long ,
`TextData` LongText ,
`SPID` Long )
Note the slanted single quote is used, and Excel types not SQL.
"Karunakaran" <Karunakaran (AT) discussions (DOT) microsoft.com> wrote
Quote:
How can I create an excel file dynamically and export data to a specific
sheet from sql server dts?.
Karunakaran |