Click here to Skip to main content
Click here to Skip to main content

Tagged as

Go to top

Reading Excel file in SQL Server

, 17 Jan 2011
Rate this:
Please Sign up or sign in to vote.
Shows how to read an Excel file using SQL query commands from SQL Server
Syntax:
SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
          'Excel 8.0;Database=<FILE_PATH>',
          'SELECT * FROM [Sheet1$]')
 

Example:
SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
          'Excel 8.0;Database=\\labdbs1\APPLICATIONS\branch.xls',
          'SELECT * FROM [Sheet1$]')

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

pankaj_254768

United States United States
No Biography provided

Comments and Discussions

 
GeneralJust what we were looking for today PinmemberMember 1068382119-Mar-14 11:27 
QuestionI get an error regarding JET OLEDB Pinmembersharp_k19-Apr-12 10:46 
Generalnice 1!!! thanx Pinmembersun_ak4725-Dec-11 22:01 
GeneralReason for my vote of 5 nice Pinmembercgy22015-Aug-11 22:27 
GeneralReason for my vote of 4 thanks for sharing PinmemberPranay Rana17-Jan-11 23:07 
GeneralEdited all-caps, added description PinsubeditorIndivara17-Jan-11 21:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 18 Jan 2011
Article Copyright 2011 by pankaj_254768
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid