Importing Excel data into an Azure SQL server via Access

Hello All

I have a database which is split with the frontend (in Access 2010) and the backend on an SQL server in the cloud on Azure.  Previous to this the database was completely on a server in house on Access 2010 only.

The old database ran a vba procedure which would take a range from an excel spreadsheet (the columns were always A-C but the rows could change) and import the data into a table.

I do not know how to import the excel info from the excel spreadsheet into a table on the Azure machine via a form on Access.  Ideally I would like the user to see a form, press an import button, and the correct excel range would import into the table on the server.  Then I could manipulate the data as I needed to.

In the old database I used DoCmd.TransferSpreadsheet acImport (Actually I had to run this chunk of code in a loop because the only way to tell I got to the bottom of the data was that the word TOTAL would appear in column A)

Any help is really appreciated.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TransferSpreadsheet imports all rows.  I'm not sure what you did to restrict it.

Why doesn't TransferSpreadsheet work now?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Eric ShermanAccountant/DeveloperCommented:
Easy, just do the following and everything should work the same.

Link the table from your backend on an SQL server in the cloud on Azure into your Access front-end.  Then import to that table.  You may have to change the name of your table in your chunk of code ... check the name after you link manually link it.  I think it may be prefixed with dbo.tablename, etc., etc.

alevin16Author Commented:
I did not realize that transferspreadsheet would work.  I just assumed it would not (I know pretty stupid of me).  And I actually have code in there that was renaming it so I think I might have overthought this.  I will give this a try later and report back.

Thanks to all!
The beauty of ODBC is it shelters the Access app from whatever BE it is connected to so it doesn't much matter whether it is Azure, Oracle, Pervasive, or anything else.  ODBC is not 100% since there are still quirks (mostly due to the way each driver is implemented) but in general, the BE doesn't matter.
alevin16Author Commented:
It looks like I was just overthinking it.  Looks like it is working.  If something goes wrong I will post again (Azure has tricked me in the past by looking like it was working :D)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.