Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax for Excel in an Execute SQL Task to drop a specific cell

Status
Not open for further replies.

HoustonGuy

Programmer
Jun 29, 2000
165
US
I'm trying to delete two specific cells in a ss. (A32 and A33)
I'm using an Exxecute SQL task to do this. I've seen examples online that show this syntax:

Drop Table ['My Sheet Summ$A32:A33'] - The name of my sheet is ['Agent Summary Report-Agent Summ$']

This doesn't work, since it can't find a sheet labeled, My Sheet Summ$A32:A33

So I've tried all alternatives I can think of:

Drop Table ['Agent Summary Report-Agent Summ$'](A32:A33)
Drop Table ['Agent Summary Report-Agent Summ$']A32:A33

etc.

Anyone know what the syntax should be to refer to a cell or cell range?
Here is the web page that I'm using for reference:

Link

Cross posted in the SSIS group.
Thanks in advance!
 

hi,

Drop Table drops, er...., uh....., um.....

THE ENTIRE TABLE!

Code:
Drop Table ['Agent Summary Report-Agent Summ$']

In Excel the Sheet name IS the table name.

You may need to shorten the sheet name.

 
Yes i'm aware that drop table drops the table, however from the link I provided it was suggested a cell range could be dropped. If it cant, it cant, but if I'm on the right track I'm asking for syntax help.

Th sheet name length is irrelevant to my issue.
 
Well I gave you a solution that removes the entire table from the workbook/sheet.
 
Yes, I was already aware of that from my testing.
thanks for your input, however. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top