How to delete records in a linked Excel table within Access?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I delete records in a linked Excel table from within Access. I have a
spreadsheet that I'm linking to that I'd like to run a delete query against.

I get the following message: "Deleting data in a linked table is not
supported by this ISAM."
 
How do I delete records in a linked Excel table from within Access. I have a
spreadsheet that I'm linking to that I'd like to run a delete query against.

I get the following message: "Deleting data in a linked table is not
supported by this ISAM."

That's because deleting records (in an Excel spreadsheet) is not
supported from within Access.

A spreadsheet is not an Access table. Some things you just can't do!

I think you should be able to use automation with VBA to run an Excel
Macro to delete the rows, but just a Delete query will not work.

John W. Vinson[MVP]
 
John Vinson said:
That's because deleting records (in an Excel spreadsheet) is not
supported from within Access.

A spreadsheet is not an Access table. Some things you just can't do!

I think you should be able to use automation with VBA to run an Excel
Macro to delete the rows, but just a Delete query will not work.

John W. Vinson[MVP]

Hmmmm...I wonder if you import the Excel's spreadsheet into a database
table; then find the record(s) you would want to delete in the spreadsheet
and removes those records. Afterwards, have Access re-create the spreadsheet
in the Excel file (guess it would depend on how big the spreadsheet is
however). Can you do that with Access? I know I can import, but can you
export to an Excel file into a specific sheet?

Respectfully,

Todd Shillam
 
Hmmmm...I wonder if you import the Excel's spreadsheet into a database
table; then find the record(s) you would want to delete in the spreadsheet
and removes those records. Afterwards, have Access re-create the spreadsheet
in the Excel file (guess it would depend on how big the spreadsheet is
however). Can you do that with Access? I know I can import, but can you
export to an Excel file into a specific sheet?

That should work well enough; the Excel Macro might be more efficient,
but you can certainly use the TransferSpreadsheet() method in both
directions from VBA.

I'm no expert on Excel interaction though - you might want to start a
new thread, or perhaps someone with more expertise in this area can
jump in.

John W. Vinson[MVP]
 
Back
Top