Deleting Data from Excel Sheet
I want to delete data from a excel sheet. It is possible to delete data from excel sheet.
I am using this code for deleting data from excel.
hstmt = Db_executesql(hdb,"DELETE * FROM [Sheet1$] where [Sheet1$].Second='TWO'" )
Re: Deleting Data from Excel Sheet
Hi AjayPalMore ,
I find this from deleting in Excel table:
"Delete in Excel table
You are more restricted in deleting Excel data than data from a relational data source. In a relational database, "row" has no meaning or existence apart from "record"; in an Excel worksheet, this is not true. You can delete values in fields (cells). However, you cannot:
1. Delete an entire record at once or you receive the following error message:
Deleting data in a linked table is not supported by this ISAM.
You can only delete a record by blanking out the contents of each individual field.
2. Delete the value in a cell containing an Excel formula or you receive the following error message:
Operation is not allowed in this context.
3. You cannot delete the empty spreadsheet row(s) in which the deleted data was located, and your recordset will continue to display empty records corresponding to these empty rows."