Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hopefully, last Excel question:)
Message
From
11/04/2002 16:23:20
 
 
To
All
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
Hopefully, last Excel question:)
Miscellaneous
Thread ID:
00643943
Message ID:
00643943
Views:
41
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()
Randy Belcher
AFG Industries, Inc.
Next
Reply
Map
View

Click here to load this message in the networking platform