substituting an Excel worksheet for an Access database
Sorry in advance for the rookie-ness you are about to hear.....
I have VB application that uses an Access DB, call the database: db_1.
For reasons best left unsaid, I have to substitute an Excel worksheet for db_1 - as far as the VB application is concerned.
I hope to populate this new data on the worksheet, link the sheet into the Access database, name it the same as the DB that the Application is currently using, and basically not have the application know that its DB has been swapped out from under it.
Now I know I am off here - no way its that straightforward - for starters..doesn't the SQL accessing an Excel sheet have to specify cell ranges and such - things that the exisiting SQL I'm sure doesn开发者_JAVA百科't have to do.
A mini, thumbnail sketch about how to achieve this would be most appreciated.
There's something about asking a question that gets the brain going.....Turns out, it really IS that simple. I populated the spreadsheet, linked it into Access (wherein Access makes it a full fledged table right then - didn't realize that) and then renamed the old table and gave the Excel table the name. There are no table relationships in this case (thank God). So i'm guessing that's it. That spreadsheet, once linked, is every bit an Access table. Go figure. –
精彩评论