all groups > sql server dts > july 2007 >
You're in the

sql server dts

group:

Excel Destination task not working.


Excel Destination task not working.
7/5/2007 3:17:35 PM
sql server dts:
I'm using SS 2005.

I've got an SSIS package. I'm trying to write some data to an Excel
Destination. It keeps appending to what is there, instead of
overwriting. So, I'm trying to give it a fresh file each time to
write to, i.e. empty except for the column headings. I delete all
rows except the column header row.

Whenever I try to do this, it balks and says can't conert DT_TimeStamp
to DT_R8 for two fields (fields are not Timestamp, but datetime), then
gives me something like VSIS_Broken.

However, when I take this same excel file, and repopulate the data I
deleted, by doing a "Refresh Data" with an external query, the SSIS
package can then write to it. But it appends it to the existing data.

How do I clear out the data, but keep whatever setup the Excel
Destination task is recognizing?

I tried deleting with OpenDataSource, and it doesn't like doing that.

I posted this in response to another thread, but it must be an old
thread, as I can't find it now to check for responses.

D.S.
Re: Excel Destination task not working.
7/6/2007 9:00:13 AM
[quoted text, click to view]

here's the things I did to fix this:

Got rid of an external query definition in the same place where I was
trying to export the data to.

Got rid of the "First row includes column headings", and did a manual
map to the "F1....F26" fields.

Seems to work now.

Oh, to get around the appending, I have a template file with nothing
in it. When I get ready to export, I take that template file and copy
it to the "holding" file. This essentially creates an empty worksheet
each time. Then, when I export to the "holding" file, it is always
empty.

Its an annoying work-around, but I'll take what I can get at this
point.
Re: Excel Destination task not working. Panos Stavroulis.
9/17/2007 11:28:01 AM
Had to resort to a similar solution. After trying to use Excel as the
destination in vain then read about ole db as excel destination which works
better. However, it's almost impossible to delete from it. I think MS should
provide better tools on the Excel destination task, it's quite basic you want
to re-create the data and should be an easier way.

Panos.

[quoted text, click to view]
AddThis Social Bookmark Button