Methods of Data Pull from Excel to Database Tables:
There are several methods that can be used to pull the data from an excel sheet into a database table.
And later, click OK, which will complete the configuration of the Linked Server for the Excel file. To import the data to a table we can use a select into query as
SELECT * INTO data_frm_excel FROM EXCELLINK...Sheet1$
This select statement selects the data from the linked excel file from sheet 1. EXCELLINK is the linked server name we have chosen here which could be given as ever required on their own choice.
And there are other methods that can be used to load the data to tables in the same way using Programming concepts which aren't explained here. For further reference, go to the following link.
http://support.microsoft.com/kb/321686
There are several methods that can be used to pull the data from an excel sheet into a database table.
- Using SQL Server's Import and Export wizard that lets us choose the excel file from which the data to be pulled. Each sheet of the excel file can be distinguished from the sheet name during the mapping step in the wizard. A sheet, for example sheet 1 is referred as Sheet1$ and so is Sheet2$ and so on.
- Creating an SSIS package, that lets us choose the data source to be an excel file and the data destination that would be a database table through a OLE DB Connection properly set up.
- Another way would be using a linked server. Here, select the OLE DB provider to be Microsoft Jet 4.0 OLE DB Provider. Select the Product Name as Excel, Data source is the full path of the Excel file and the provider string is Excel 8.0. This configuration is as mentioned in the below picture.
And later, click OK, which will complete the configuration of the Linked Server for the Excel file. To import the data to a table we can use a select into query as
SELECT * INTO data_frm_excel FROM EXCELLINK...Sheet1$
This select statement selects the data from the linked excel file from sheet 1. EXCELLINK is the linked server name we have chosen here which could be given as ever required on their own choice.
And there are other methods that can be used to load the data to tables in the same way using Programming concepts which aren't explained here. For further reference, go to the following link.
http://support.microsoft.com/kb/321686
Comments
Post a Comment