dbTalk Databases Forums  

Appending Instead of Overwriting Excel File

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


Discuss Appending Instead of Overwriting Excel File in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rubens
 
Posts: n/a

Default Appending Instead of Overwriting Excel File - 03-20-2008 , 07:54 AM






I have a simple DTS package that I need to insert records into an Excel file. I want to start with a blank worksheet every time. However, it is just appending to the file instead of overwriting it. Here is how I have the package setup:

1.. SQL task that uses "drop table" on the Excel connection.
2.. SQL task that uses "create table" on the Excel connection.
3.. Transform data task that pumps the data from SQL to Excel.
How can I get this to overwrite the file instead of append to it?

Thank-you,
Rubens

Reply With Quote
  #2  
Old   
Rubens
 
Posts: n/a

Default Re: Appending Instead of Overwriting Excel File - 03-20-2008 , 08:18 AM






I figured it out. I had two problems. First of all, the length of my table name was too long for an Excel workbook. Secondly, there was only 1 sheet in the workbook which Excel cannot drop because you need at least 1. So I added an additional sheet and it now works.

Thank-you,
Rubens
"Rubens" <rubensrose (AT) hotmail (DOT) com> wrote

I have a simple DTS package that I need to insert records into an Excel file. I want to start with a blank worksheet every time. However, it is just appending to the file instead of overwriting it. Here is how I have the package setup:

1.. SQL task that uses "drop table" on the Excel connection.
2.. SQL task that uses "create table" on the Excel connection.
3.. Transform data task that pumps the data from SQL to Excel.
How can I get this to overwrite the file instead of append to it?

Thank-you,
Rubens

Reply With Quote
  #3  
Old   
Rubens
 
Posts: n/a

Default Re: Appending Instead of Overwriting Excel File - 03-20-2008 , 08:18 AM



I figured it out. I had two problems. First of all, the length of my table name was too long for an Excel workbook. Secondly, there was only 1 sheet in the workbook which Excel cannot drop because you need at least 1. So I added an additional sheet and it now works.

Thank-you,
Rubens
"Rubens" <rubensrose (AT) hotmail (DOT) com> wrote

I have a simple DTS package that I need to insert records into an Excel file. I want to start with a blank worksheet every time. However, it is just appending to the file instead of overwriting it. Here is how I have the package setup:

1.. SQL task that uses "drop table" on the Excel connection.
2.. SQL task that uses "create table" on the Excel connection.
3.. Transform data task that pumps the data from SQL to Excel.
How can I get this to overwrite the file instead of append to it?

Thank-you,
Rubens

Reply With Quote
  #4  
Old   
Rubens
 
Posts: n/a

Default Re: Appending Instead of Overwriting Excel File - 03-20-2008 , 08:18 AM



I figured it out. I had two problems. First of all, the length of my table name was too long for an Excel workbook. Secondly, there was only 1 sheet in the workbook which Excel cannot drop because you need at least 1. So I added an additional sheet and it now works.

Thank-you,
Rubens
"Rubens" <rubensrose (AT) hotmail (DOT) com> wrote

I have a simple DTS package that I need to insert records into an Excel file. I want to start with a blank worksheet every time. However, it is just appending to the file instead of overwriting it. Here is how I have the package setup:

1.. SQL task that uses "drop table" on the Excel connection.
2.. SQL task that uses "create table" on the Excel connection.
3.. Transform data task that pumps the data from SQL to Excel.
How can I get this to overwrite the file instead of append to it?

Thank-you,
Rubens

Reply With Quote
  #5  
Old   
Rubens
 
Posts: n/a

Default Re: Appending Instead of Overwriting Excel File - 03-20-2008 , 08:18 AM



I figured it out. I had two problems. First of all, the length of my table name was too long for an Excel workbook. Secondly, there was only 1 sheet in the workbook which Excel cannot drop because you need at least 1. So I added an additional sheet and it now works.

Thank-you,
Rubens
"Rubens" <rubensrose (AT) hotmail (DOT) com> wrote

I have a simple DTS package that I need to insert records into an Excel file. I want to start with a blank worksheet every time. However, it is just appending to the file instead of overwriting it. Here is how I have the package setup:

1.. SQL task that uses "drop table" on the Excel connection.
2.. SQL task that uses "create table" on the Excel connection.
3.. Transform data task that pumps the data from SQL to Excel.
How can I get this to overwrite the file instead of append to it?

Thank-you,
Rubens

Reply With Quote
  #6  
Old   
Rubens
 
Posts: n/a

Default Re: Appending Instead of Overwriting Excel File - 03-20-2008 , 08:18 AM



I figured it out. I had two problems. First of all, the length of my table name was too long for an Excel workbook. Secondly, there was only 1 sheet in the workbook which Excel cannot drop because you need at least 1. So I added an additional sheet and it now works.

Thank-you,
Rubens
"Rubens" <rubensrose (AT) hotmail (DOT) com> wrote

I have a simple DTS package that I need to insert records into an Excel file. I want to start with a blank worksheet every time. However, it is just appending to the file instead of overwriting it. Here is how I have the package setup:

1.. SQL task that uses "drop table" on the Excel connection.
2.. SQL task that uses "create table" on the Excel connection.
3.. Transform data task that pumps the data from SQL to Excel.
How can I get this to overwrite the file instead of append to it?

Thank-you,
Rubens

Reply With Quote
  #7  
Old   
Rubens
 
Posts: n/a

Default Re: Appending Instead of Overwriting Excel File - 03-20-2008 , 08:18 AM



I figured it out. I had two problems. First of all, the length of my table name was too long for an Excel workbook. Secondly, there was only 1 sheet in the workbook which Excel cannot drop because you need at least 1. So I added an additional sheet and it now works.

Thank-you,
Rubens
"Rubens" <rubensrose (AT) hotmail (DOT) com> wrote

I have a simple DTS package that I need to insert records into an Excel file. I want to start with a blank worksheet every time. However, it is just appending to the file instead of overwriting it. Here is how I have the package setup:

1.. SQL task that uses "drop table" on the Excel connection.
2.. SQL task that uses "create table" on the Excel connection.
3.. Transform data task that pumps the data from SQL to Excel.
How can I get this to overwrite the file instead of append to it?

Thank-you,
Rubens

Reply With Quote
  #8  
Old   
Rubens
 
Posts: n/a

Default Re: Appending Instead of Overwriting Excel File - 03-20-2008 , 08:18 AM



I figured it out. I had two problems. First of all, the length of my table name was too long for an Excel workbook. Secondly, there was only 1 sheet in the workbook which Excel cannot drop because you need at least 1. So I added an additional sheet and it now works.

Thank-you,
Rubens
"Rubens" <rubensrose (AT) hotmail (DOT) com> wrote

I have a simple DTS package that I need to insert records into an Excel file. I want to start with a blank worksheet every time. However, it is just appending to the file instead of overwriting it. Here is how I have the package setup:

1.. SQL task that uses "drop table" on the Excel connection.
2.. SQL task that uses "create table" on the Excel connection.
3.. Transform data task that pumps the data from SQL to Excel.
How can I get this to overwrite the file instead of append to it?

Thank-you,
Rubens

Reply With Quote
  #9  
Old   
Rubens
 
Posts: n/a

Default Re: Appending Instead of Overwriting Excel File - 03-20-2008 , 08:18 AM



I figured it out. I had two problems. First of all, the length of my table name was too long for an Excel workbook. Secondly, there was only 1 sheet in the workbook which Excel cannot drop because you need at least 1. So I added an additional sheet and it now works.

Thank-you,
Rubens
"Rubens" <rubensrose (AT) hotmail (DOT) com> wrote

I have a simple DTS package that I need to insert records into an Excel file. I want to start with a blank worksheet every time. However, it is just appending to the file instead of overwriting it. Here is how I have the package setup:

1.. SQL task that uses "drop table" on the Excel connection.
2.. SQL task that uses "create table" on the Excel connection.
3.. Transform data task that pumps the data from SQL to Excel.
How can I get this to overwrite the file instead of append to it?

Thank-you,
Rubens

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.