Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hopefully, last Excel question:)
Message
De
12/04/2002 03:30:19
 
 
À
11/04/2002 16:23:20
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00643943
Message ID:
00644118
Vues:
10
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.asp

The 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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform