Randy,
I don't think you can with the ODBC driver. See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcjetdrop_table_statement_limitations.aspThe Excel ODBC driver is very limited. Automation would give you much more control.
>First, thanks for the help. I have my ADO.NET dataset table loading into an excel spreadsheet with no problems. There is one more thing I want to do though. Since I created the spreadsheet that has my data, I want to delete the original excel spreadsheet (Sheet1) or at least make my sheet the default, so when the user opens the workbook, my data will be displayed without the user having to click on the spreadsheet tab. I am trying to stay away from automation, that is why I have been trying to delete Sheet1. Any suggestions. Thanks for the help. Below is a couple of things that I have tried.
>
>' No error occurs on this code, but Sheet1 still exists when i open the
>' workbook
>lobjCM.CommandText = "DROP TABLE [Sheet1$]"
>lobjCM.ExecuteNonQuery()
>
>' For this code, I get the error - Operator is missing - TABLE Sheet1
>lobjCM.CommandText = "DELETE TABLE [Sheet1$]"
>lobjCM.ExecuteNonQuery()
Daniel