.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

How to import Data from Excel to SQL Server Express

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :ASP.Net
 Hi,  please any one is expert in Data Base help me, i would like to import two Data columns from Excel file 2003 instead of two columns in a table in Sql Server Express 2005 , How Can i do that? and what is the way if I have Sql Developer 2005, thank you .  

View Complete Post

More Related Resource Links

Import Excel data into SQL Server express 2008

I have recently installed SQL express 08 and created a table to import excel data into.  Im running on a windows 7 64 bit OS i5 processor.  I've disabled the firewall (temporarily) and will set the necessary ports once this is working. I run the following query:  (which i found from multiple sources on the net) Select   * From OPENROWSET ( 'Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\Users\Public\lenovoBkup\contacts\outlookFiles\noib2a.xls', 'Select * From [sheet1$]' )  and receive the following message: Msg 7308, Level 16, State 1, Line 1                                                                                  OLE DB provider 'Microsoft.Jet.OLEDB.4.0' cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode.  (how did they know i was single and living in an apartment? lol) so after research of the following message i restarted the system and relaunched man

How to Import Excel Data into SQL Server 2008(64 bit) Using SQL Query (in Windows Server 2008 64bit

I am developing VB .Net application in Visual Studio 2008(64bit), SQL Server 2008(64bit) and Windows Server 2008(64bit) environment.

I need to import an Excel and Flat files data into SQL Server database using SQL Query. I tried a lot with the following SQL Queries directly with SQL Server Management Studio,

1. SELECT * INTO  dbo.ExcelImportTest FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=D:\PTPLDCT\DCT Test Datasource\DCT_Excel_Test_Sample_1.xls',
'select * from [Sheet1$]')

While executing i got an error as below,

Msg 7403, Level 16, State 1, Line 1
The OLE DB provider "Microsoft.Jet.OLEDB.4.0" has not been registered.

2. I have also tried with MSDASQL provider,

Select * from openrowset('MSDASQL','Driver={Microsoft Excel Driver (*.xls)};
Dbq=DCT_Excel_Test_Sample_1.xls;DefaultDir=D:\PTPLDCT\DCT Test Datasource\', 'Select * from [Sheet1$]')

Then i encountered the following error,

OLE DB provider "MSDASQL" for linked server "(null)" returned message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified".
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "(null)".

3. Finally i have tried the Query with Linked Server,

EXEC sp_addlinkedserver @server = '

SQL Server Management Studio Express Data Import



I have installed SQL Server Management Studio Express and trying to import my access tables to SQL database.  In the blogs I have read I can do it from Tasks>>>>Import Data BUt my Tasks menu does not contain any Import Data.   It only contains

Detach, Shrink, Backup, Restore, Generate Scripts.

What is the problem with my Server Management Studio Express

import unstructured data from excel to SQL Server??


I need urgent help with  importing unstructured data from excel to SQL Server

where  columns of sql table are not in first row in the excel sheet

Excel sheet format is like the following

first name  on first row

last name is on second row  and second column B

date on third row and on column D

I will open connection to excel sheet and start copying data into sql Table

please help

Trying to import excel data into dbo schema using odbc connection with sql server


I have written this vb.net code to import an excel spread sheet but need for it to imported into the dbo shema. When I look in the database the table name is me.tablename instead of dbo.tablename.

    Public Sub Main()
        Dim sheetname As String
        excelpath = "S:\Account Management\jkormann\DynamicScoring\GE_Money_MN.xls"
        ServerName = "server"
        DBName = "sf"
        'SchemaName = "dbo"
        InsertedTableName = Dts.Variables("strTableName").Value.ToString
        sheetname = Dts.Variables("strSheet").Value.ToString
        'ImporttoServer(CStr(ExcelPath), CStr(ServerName), CStr(DBName), CStr(SchemaName), CStr(InsertedTableName))
        ImporttoServer(CStr(ExcelPath), CStr(ServerName), CStr(DBName), CStr(InsertedTableName), CStr(sheetname))

        Dts.TaskResult = Dts.Results.Success

Import/Export data with SQL Server 2005 Express

Hello folks!
I have installed SQL Server 2005 Express and SQL Server Management Studio Express. Everything looks ok and works fine, but I can't find the Data Import/Export Wizard.  Can anyone tell me how to Import/Export data?

Thank you!!!

SQL Express R2 - Import / Export Data (32-bit) - Excel - Unexpected Unrecoverable Error


Preface - I'm BRAND NEW to SQL! Bought a book and working to learn :) I've have a lot of experience in Access and other msft titles.

I've installed SQL Express 64 bit on Win 7 (64) and I'm trying to setup my 1st table to start practicing running queries on and I’m having nothing but trouble!! I'm trying to use the import / export wizard to import Excel '07 spreadsheet that has a table of data and I CANNOT get through this without crashing! EVERY SINGLE TIME!

My Steps:

1.  Open Wizard

Import excel data to Sql Server 2005 problem




I have tried to import data from Excel 2003 to Sql Server 2005 using the Import Wizard to no avail.  Here is my issue:


Excel column has            After import, database table

these value sets:             has these corresponding value sets:

1.01                              null

1.02                              null

1.04                              1.04

1.05                              1.05

1.06                              null

Consuming External Data Using SharePoint Server 2010 Business Connectivity Services and an Excel 201

Learn how to use BCS in SharePoint Server 2010 to access and update external data by using Microsoft Excel 2010 as a client.

Insert Excel Data via File Upload into sql server database???

Hi all, I have requirement that User can Upload the Excel Sheet Data to sql server Database at once. How i do that Any Article or hint is apperciated.   Regards 

how to import the data of excel into gridview1 using asp.net/c#

i m having excel file a.xlsi m having gridview1,fileupload1how to import excel file from fileupload1 get the destination of a.xls and show the values in gridview1if any boby knows full code answer/mail me at ponmanivannangj@mobiusservices.in

Importing Data from Excel into SQL Server using SSIS: some datetime values appear as NULLS How to Re

I created a Package in the Business Intelligence studio to Import data from Excel file  into SQL Server 2005 using a Excel Source and a OLE DB Destination that uses a data convertion transformation before it reaches the destination a mjority of the data is copied over. However i am having 2 Issues. 1. In the Date field some of the values appear as Null in SQL Server 2. I need to change the format of the date in Excel from dd/mm/yyyy to mm/dd/yyyy before inserting into SQL Server if Possible. I am not sure of the solution for Ques 1 but i attempted using a script task for #2 It did not work. Please Advice what the best way to proceed Thanks.

Import excel sheet data to datagrid without using oledb

In my application(C#) i want to import excel sheet to show its data in DatatGridView i dont want to use oledb Need sample code can any any Help

Search Server 2010 Express Error when crawling LOB Data with BCS Error while crawling LOB contents.

Ok so search server is crawling our BCS external data source which has some columns that allow null. When it hits a null in one of these columns it dies out with: Error while crawling LOB contents. ( '.', hexadecimal value 0x00, is an invalid character. Line 94, position 11. ) This is in the crawl log Is the a Fix / Update / Work around for this (other than modifying the table, taking off allow nulls and using a "blank" default value)

Import Excel data into SQL db

 First off sorry if this is in the wrong place but there are over a dozen forum sections here and this seems to be the only one that comes close to what I need.. anyway ... I'm trying to use Visual Web Developer 2008 express to create a form that will allow a user to select an excel file and upload it's values to SQL. I found the following code in another post but as I'm a newbie to C# I'm confused about what 'using' items it needs to run. I keep getting errors like 'System.Web.UI.Page.Application' is a 'property' but is used like a 'type' and "The type or namespace name 'Workbook' could not be found (are you missing a using directive or an assembly reference?)" So what kind of obvious stuff am I overlooking? Or is this just an impossible task for a web app?  1 public DataSet GetExcel(string fileName)2 {3 Application oXL;4 Workbook oWB;5 Worksheet oSheet;6 Range oRng;7 try8 {9 // creat a Application object10 oXL = new ApplicationClass();11 // get WorkBook object12 oWB = oXL.Workbooks.Open(fileName, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value,13 Missing.Value,

data type problem in import data from excel file


Dear All,

I am importing the data from excel file using following code.

connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(strFolderFileName) & ";Extended Properties=HTML Import;"
                conn = New OleDbConnection(connstr)
                Dim strSQL As String = "SELECT * FROM [" & strWorkSheetName & "]"

                Dim cmd As New OleDbCommand(strSQL, conn)

                Dim da As New OleDbDataAdapter(cmd)

Now the problem is if a coulmn vlaue start with a number value like "15" then the other string value like "W15" in that column is ignored in the datatable.

eg. The excel column value     Column1


Data Import sql server 2008 to SQL 2000


HI All,

How to Import data from sql server 2008 to sql server 2000 ? (i don't have any idea about SSIS, expect this any chance is there? i was try with import functionality some records are copy after it was faild i have nearly 80 Lacks records)

Please help me how to solve this issue this is very urgent form me...

Thanks, Prasad.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend