Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting data in a linked excel sheet

Status
Not open for further replies.

zevw

MIS
Jul 3, 2001
697
US
In my database I link to an excel sheet where I append the data into my table. After the append is done I would like to delete the data from the excel sheet, so that it is not imported again. I get a message that I cannot delete linked data what can I do so that it is deleted.

I cannot delete the sheet because the user will need the format of this sheet for new data entered later.

Thanks in advance for you help.
 
I cannot delete the sheet because the user will need the format of this sheet for new data entered later
Why not using a template (.xlt) ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
To be honest I do not know how to use an xlt.

Is there another way around?
 
You could run an update query on the linked sheet, setting the values to Null. Note that this won't work for cells with formula.

HTH,
fly

[blue]Typos, that don't affect the functionality of code, will not be corrected.[/blue]

Martin Serra Jr.
[blue]Shared Database_Systems and _Applications across all Business_Areas[/blue]
 
I would also use a template, but flyover789's example sounds like the trick. You might also try to write a macro in your Excel spreadsheet that is ran when Access prompts it to run. You should be able to delete data using Excel macros prompted by MS Access Module.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top