Excel ODBC Driver

I want to be able to sort through an Excel/CSV file using SQL commands. Is there any way that I can do that?
Who is Participating?

Improve company productivity with a Business Account.Sign Up

Anthony MellorConnect With a Mentor Chartered AccountantCommented:
you can also do it with MS Query and also Powerpivot (SQL is within)

ps your version of Excel is highly relevant.
Anthony PerkinsCommented:
If SQL Server is 32 bit you can use the JET driver and specifically OPENROWSET()
dlmilleConnect With a Mentor Commented:
Yes, using VBA you can adapt the following to sort through a CSV file:


And, you can adapt the following to sort through an Excel file:


Here's another good link I use as a ready reference:

If you need further assistance, please don't hesitate to ask.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.