Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
I would like to ADD, RENAME and DELETE COLUMNS In Excel using ADO. I am using ADO 2.7, Excel 2002. 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cannot Move, Copy, Insert, Rename, or Delete a Worksheet in Any Wo | Excel Discussion (Misc queries) | |||
delete and rename tab options are grayed out | Excel Worksheet Functions | |||
Macro To Delete/Add & Rename/Arrange Sheets | Excel Discussion (Misc queries) | |||
HOW DO I DELETE A WORKSHEET IN EXCEL? NOT HIDE IT OR RENAME IT | Excel Worksheet Functions | |||
"Delete" should not be next to "rename" on right-click of mouse | Excel Discussion (Misc queries) |