In an earlier article I reviewed how to query an Excel spreadsheet from SQL Server Management Studio (SSMS). I’ve found that this functionality is very useful, especially when working with data maintained by business users outside of a database system.
For an overview of how to connect SSMS with an Excel WorkSheet, please see my detailed article covering the subject. I continue to use the method of saving my SpreadSheet as a .xls format file which I then connect to using the OpenRowSet command with the Microsoft Jet OLEDB 4.0 driver. Once the Excel worksheet is query-able by SSMS it’s quite simple to work with this data just like you would work with a regular table.
However, one important caveat is that if your worksheet contains numeric as well as alphabetic data, this will confuse the driver and depending on the order of the data in your Spreadsheet, null results will be returned instead of the numeric data.
This behavior can be surprising when one first notices it, but happily it can be easily corrected so that you can properly query mixed data type columns.

