ADD, RENAME AND DELETE COLUMNS
- From: "Paramasivan" <mparamasivan@xxxxxxxxx>
- Date: 16 Sep 2005 01:29:31 -0700
Hi All,
I would like to ADD, RENAME and DELETE COLUMNS In Excel using ADO.
I am using ADO 2.7
I have used the following code for delete column..
conConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=""" & strExcelFileName & """;Extended Properties=""Excel
8.0;HDR=Yes"""
conConnection.Mode = adModeReadWrite
conConnection.Open
strSQL = "ALTER TABLE [" & SheetName & "$] DROP COLUMN [" &
strColumnName & "]"
conConnection.Execute strSQL
Similarly I have used SQL for Adding and renaming columns.
But in all cases I am getting the error -2147467259 Invalid Operation.
Please help me to solve this problem.
Regards,
Paramasivan
.
- Prev by Date: Re: Querying Mutliple Databases
- Next by Date: RE: Why does query take 1 minute or two hours to run?
- Previous by thread: Re: Querying Mutliple Databases
- Next by thread: How to solve the error:Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
- Index(es):