dbTalk Databases Forums  

How do I create a NEW excel file and not append to existing excel file ?

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


Discuss How do I create a NEW excel file and not append to existing excel file ? in the microsoft.public.sqlserver.dts forum.



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

Default How do I create a NEW excel file and not append to existing excel file ? - 07-03-2003 , 11:08 AM






hi,

i am trying to run a SQL query and export it to an excel
file. however, it is appending the new query to the
existing query instead of over-writing it.
I tried using file system object to delete the file and
create a new, blank one; but then the fieldnames are not
mapped.
Does anyone know the setting or how to overwrite the excel
file ?

thanks in advance,
lee

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

Default Re: How do I create a NEW excel file and not append to existing excel file ? - 07-14-2003 , 07:17 AM






I tried this, but the new (copied) spreadsheet was never the same as the
original template, it simply had a single sheet in it with the first few
cells containing the text: "The file cannot be copied onto itself, 0 files
copied"

any ideas?

Brian

"x (AT) cc (DOT) com" <X (AT) cc (DOT) com> wrote

Quote:
We keep a blank formatted excel sheet , call a batch file using execute
process task, before writing to the spreadsheet. The batch file copies the
blank spreadsheet over the existing sheet forcing the package to always
"append" to a blank sheet.


It is actually very simple logic but took us a while to fiqure out.


"SkiCougar" <lholsenbeck (AT) swbanktx (DOT) com> wrote in message
news:0b9401c3417d$5e7d8e30$a501280a (AT) phx (DOT) gbl...
hi,

i am trying to run a SQL query and export it to an excel
file. however, it is appending the new query to the
existing query instead of over-writing it.
I tried using file system object to delete the file and
create a new, blank one; but then the fieldnames are not
mapped.
Does anyone know the setting or how to overwrite the excel
file ?

thanks in advance,
lee





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.