devxlogo

Import Excel Data into SQL

In order to read from an Excel Spreadsheet through SQL you need to install the Office 2010 Database Engine. Afterwards, run statements similar to the following:

EXEC sp_configure 'Show Advanced Options', 1RECONFIGURE with overrideGOEXEC sp_configure 'Ad Hoc Distributed Queries', 1RECONFIGURE with overrideGOSELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0','Excel 12.0;Database=C:ImportFileName.xlsx','SELECT * FROM [Sheet1$]')

Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.