import data through excel file


hii all,

        i've to import bulk data from excel file to sql server 2000 , i'm using 1.1 with C# and i've to make a front end(windows application) for this.

help me out if any1 knows that...

Thanks & Regards

anant vijay

3/3/2008 6:33:03 AM 29906 articles. 0 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 21

u can use bulk insert.

Plz check these links

Thank u


Please remember to click "Mark as Answer" on this post if it helped you. 

Thank u


Please remember to click "Mark as Answer" on this post if it helped you.
3/3/2008 7:49:07 AM


try to like this,

// Connection String to Excel Workbook
string excelConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Book1.xls;Extended Properties=""Excel 8.0;HDR=YES;""";

// Create Connection to Excel Workbook
using (OleDbConnection connection =
new OleDbConnection(excelConnectionString)) { OleDbCommand command = new OleDbCommand
"Select ID,Data FROM [Data$]", connection); connection.Open(); // Create DbDataReader to Data Worksheet using (DbDataReader dr = command.ExecuteReader()) { // SQL Server Connection String string sqlConnectionString = "Data Source=.; Initial Catalog=Test;Integrated Security=True"; // Bulk Copy to SQL Server using (SqlBulkCopy bulkCopy = new SqlBulkCopy(sqlConnectionString)) { bulkCopy.DestinationTableName = "ExcelData"; bulkCopy.WriteToServer(dr); } } }
check this url regarding data transfer excel to sql
check this url regarding data transfer sql to excel
3/3/2008 8:06:22 AM

Similar Artilces:

Import excel data from Microsoft excel to SQL Server usin C sharp .net
Hi Could anyone help me with the sample code in C sharp to import data from excel to SQL server 2005 using C sharp. I have a table called Accounting Calendar ACCT_DATE with 10 columns I have the excel file called example.xls with the same column name as in SQL Server.Please help me with the sample code in C sharp Thanks      Here's a simple way to do it without the need to have excel installed Hope this helpsJaime Don't forget to click "Mark as Answer" on the post that helped you. That wa...

How to Import data from Excel into MS SQL in .Net?
Hi, I'm building a web application in VB.NET 1.1 where users will upload Excel files at this webpage and the web application will transfer the data from the uploaded Excel file into MS SQL 2000. There are around 600-700 records and about 56 columns in the Excel file which is to be uploaded daily. There will be a few different files which I need to implement for as well.  I've sourced for and tried alot of methods. But either they can't satisfy my requirements or they just can't simply work. - Most simple and direct way I've tried is creating a oledb connection to...

How to import data in sql server 2000 from an excel(.xls) file
i want ot import data from excel .xls file to sql server 2000 into an existing table. should i use some stored procedures or else You can use DTS in SQL Server (Right click on the database in Enterprise Manager, then Import) or even attach to the Excel file in Access and then use the upsizing wizard.Starting with ASP.NET 2.0? Look at:Programming Microsoft Web Forms My Blog Thnx fo rthe reply i tried this one its fine but i want ot do something more than that i have a .xls file at my pc and i have to updat ethe database online for this i know i have to write a web applica...

importing data from Excel file to SQL Table via FileUpload control
Hi I have a requirement to allow a user to update a SQL table using an excel file that must be uploaded via a web page, The excel file will be in an agreed format although I will have to perform some validation on it before I insert rows into sql table, any errors will need to be fed back to user via the web page. the import will only affect 1 table in the SQL db, although it is possible that inserting the wrong data may violate certain foreign key constraints which I will need to trap. can someone point me in the right direction pls. I ain't got a clue how to even make a s...

Importing data from .xls excel file to a SQL Server 2005 Database
Hi guys. I have a question for you. I have a web application and I need to import some data from an .xls (microsoft excel) file to a sql server 2005 table. So, I been searching for it and I found a couple of articles, but I would like to know How can I do this when the .xls file is in a remote web server??. Another thing is that I don't want to download the .xls file to the local machine where the application is running, I mean, I want to do the importing of the data by completely remote access, I want to access the file and run the process without to make a local cop...

How can i import data from an Excel file into SQL SERVER 2005 Express or 2000
Please anybody to help me.i need to export a large chunk of excel data into SQL SERVER 2005 express or 2000 You might ask this in a SQL Server forum, unless you have to do this with ASP.NET code. JeffPlease: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue. Hi, There is a KB article provides several approaches, you may refer to it: How to import data from Excel to SQL Server KangMicrosoft Online Community SupportPlease remember to mark the re...

Importing data from either Excel Files or CSV files
Hi, I am having trouble uploading data from Excel/CSV files.  Any idea how I can get my ASP.NET application to do this?  Also, I need to transfer the data into SQL Server tables.  Any suggestion is greatly appreciated.  Thank you, Jules  this link help you  Try this one... its a good option Thank you Bupender Thanks chrisjob012!  Mark as answer if reply helped you  this gives us the confident to reply further I am new to progra...

How to Import data from excel sheet within SQL Client into SQL Server
 Hi All,   I need to  import data from excel sheet to SQL Database in SQL Server.I already done it in machine which SQL Server run.but I cant do it within SQL Client machine.while try to do it this error was occure Server: Msg 7302, Level 16, State 1, Line 2Could not create an instance of OLE DB provider 'Microsoft.Jet.OLEDB.4.0'.Please tell me How I do itThanks,Harsha Hi harsha  Can you post your code  If this post helps you, please mark it as Answer.Gnana Prakash SSoftware EngineerCoimbatore  Hi Gnana,this is My...

Import data from excel sheet data to Sql Server 2008 database
 Hello,  I am doing an project in which i am going to get the data from the excel sheet and insert it into My SQL Server 2005 database.How can i do it,can any one help me out to get me out of this problem with an example. You could use SQL Server Integration Services (SSIS) to do this.  If you need to repeat the process remember that you can host an SSIS package as a SQL Agent job and run it repeatedly, and you can kick off the job from code. A walkthrough of this is here:

Cell Formating in Excel While exportig SQL query data to excel file
This is kiran from Pune, India. We are using Asp.Net, C# for web project. In our current project, I have a sql query dataset result which i want to export to excel. So To export the data into excel, we are using HTML format i.e. stringBuilder and streamreader and then  I save it as XLS. but i am not able to format the cell. e.g. I want format of columns in excel as Text. see my code is as follows   StringBuilder sbrHTML = new StringBuilder(); sbrHTML.Append("<TABLE Border=1 ID='Table1'>"); sbrHTML.Append("<TR><TH>Name</TH><TH>AccountNo...

How to Data Transfer From Excel to Microsoft SQL Server Data base Using .Net.
Hai All, How to Data Transfer From Excel to Microsoft SQL Server Data base Using .Net. I have one Excel Sheet in that sheet 15 Fields (attributes) and 3000 records are there. In this 3000 records i want to store this (Excel) data into  5 related tables on Sql Server Database Using .Net.   How to store Excel Sheet data into Sql Server database. Please help me as soon as possible. Thank You Very Much...Have a Good Day... With RegardsSridhar...

Import excel file using sql query without installing excel on the server
Hi, I want to import excel file using sql query. MS Excel is not installed on the server. I am using sql server 2005. I do not want to achieve this by code. I want it using sql query only.  I have used openrowset but it requires MS Excel to be installed on the server. Thanks, Ashish.    Ashish Chaugule ashish_chaugule: Hi, I want to import excel file using sql query. MS Excel is not installed on the server. I am using sql server 2005. I do not want to achieve this by code. I want it using sql query only.  I have used openrowset but it requires M...

Cannot Import Excel File Into SQL
I've read about a million posts on this, but I can't seem to get this to work.  This is my production environment:Web Server (ServerA): Windows Server 2003 SP2, ASP.NET 2.0Database Server (ServerB): Windows 2003 SP2, SQL Server 2005So I'm trying to have a web form upload an excel file to a share on ServerB, and then run a stored procedure that imports the contents of the excel file into a table in my database.  I can upload the file fine, but I cannot get the stored procedure to import the data. I always get this error, whether I run the process through my web form, or ...

How to Import data from Excel file
Hi all How to import the data from excel file to datastore or datawindow during the runtime without using the DDE function. I am using PB9. Thanks in advance Regards Shivkumar K Datawindow pipeline comes to mind. "Shivkumar K" <> wrote in message news:42789ebd@forums-1-dub... > Hi all > > How to import the data from excel file to datastore or datawindow during > the > runtime without using > the DDE function. > > > I am using PB9. > > Thanks in advance > > Regards > Shivk...

Import data from a Excel File
Hello, I want to import data from a excel File into Sybase. So I use the following sql input into tb_tst from 'c:\\kero4.xls' format EXCEL; SQL Tells me that there is a error in line 34. When I tell I want to continue I have a count of 75 and not 101 as there are 101 records im my excel file. Could you please tell me what is wrong with the file (as every column is Text all should work) I saw that when I have non integer values in the column E, F, G.... I have this error. have a non integer values in column D I have no error I saw that the column E F G... are conve...

Web resources about - import data through excel file -

Scribd Adds Sheet Music And Sesame Street To Its Subscription E-Book Service
Scribd continues to expand its selection — it’s adding sheet music for the first time, and also announcing deals to bring in Sesame Street children’s ...

'Star Wars: The Force Awakens' brings together 'family' of fans
LOS ANGELES — Don't call them Star Wars fans, call them a Star Wars family. Carrying light sabers, foldable chairs, tents and endless amounts ...

People are saying that Google's new tablet computer isn't a good device
Google's Pixel C tablet, which takes it name from the line of high-end Chromebook laptops, has just hit the shelves. The device retails for $499 ...

L.A. and Chicago Are Up Next for Google Fiber
Just a day after AT&T announced that it’s bringing gigabit fiber internet to the L.A. metro area , Google has announced that it’s exploring L.A. ...

HTC Vive Virtual Reality Headset Finally Has A Release Date
The HTC Vive virtual reality headset was announced earlier this year , but unfortunately in terms of availability, neither HTC nor Valve shared ...

Police raid home of mystery man believed to be the creator of bitcoin
Sydney (By Byron Kaye and Colin Packham for Reuters) — Australian police raided the Sydney home and office on Wednesday of a man named by Wired ...

Selena Gomez Victoria’s Secret 2015 Performance
Selena Gomez Performs “Can’t Keep My Hands to Myself”/”My Girls” at the Victoria’s Secret 2015 special on CBS. Watch: The post Selena Gomez ...

Twitter experiments reordering tweets by relevance
(Reuters) - Twitter Inc confirmed on Tuesday it is testing a timeline format for its tweets, calling it an experiment. The microblogging website's ...

Yahoo reportedly gets serious about selling its core business
Yahoo appears to have more than just a casual interest in selling itself off. Both CNBC and the New York Times claim that the web giant has ruled ...

House of Representatives approves bill to ban environmentally damaging microbeads
The United States is poised to ban microbeads, minuscule pieces of plastic found in personal care products like face and body washes, toothpastes, ...

Resources last updated: 12/9/2015 11:26:50 AM