473,796 Members | 2,509 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Importing excel file data from user's computer

Hello all,

Is there any way to import an excel file data from user's computer?

I want to read all records in the excel file and write the data in a SQL
server table.

Any help will be really appreciated.

Thanks.
Oct 5 '06 #1
3 1813
create an upload form and the user can submit the file which can then be processed on the server.
"Miguel Ramirez" <mi************ @emersonclimate .comwrote in message news:OS******** ******@TK2MSFTN GP04.phx.gbl...
Hello all,

Is there any way to import an excel file data from user's computer?

I want to read all records in the excel file and write the data in a SQL server table.

Any help will be really appreciated.

Thanks.

Oct 5 '06 #2

You can create an IDataReader against an excel file.

http://support.microsoft.com/kb/316934/

Select * from [Sheet1$]

is the simplest of queries.


"Miguel Ramirez" <mi************ @emersonclimate .comwrote in message
news:OS******** ******@TK2MSFTN GP04.phx.gbl...
Hello all,

Is there any way to import an excel file data from user's computer?

I want to read all records in the excel file and write the data in a SQL
server table.

Any help will be really appreciated.

Thanks.


Oct 5 '06 #3
You can have the user upload the file, as detailed here:
http://SteveOrr.net/articles/EasyUploads.aspx

And then you can use Excel as an ADO.NET data source as detailed here:
http://www.dotnetspider.com/technolo...ages/1080.aspx

Here are more articles on the subject of working with Excel from ASP.NET:
http://SteveOrr.net/Articles/ExcelExport.aspx
http://SteveOrr.net/Articles/ExportPanel.aspx

And here are some good 3rd party products that could make your life easier
if you've got the cash:
http://SteveOrr.net/reviews/AsposeExcel.aspx
http://steveorr.net/reviews/OfficeWriter.aspx
http://www.syncfusion.com/products/xlsio/

--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net


"Miguel Ramirez" <mi************ @emersonclimate .comwrote in message
news:OS******** ******@TK2MSFTN GP04.phx.gbl...
Hello all,

Is there any way to import an excel file data from user's computer?

I want to read all records in the excel file and write the data in a SQL
server table.

Any help will be really appreciated.

Thanks.

Oct 5 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4706
by: Little PussyCat | last post by:
Hello, I nee to write something that will transfer excel data into an SQL Server table. I have for another database application I wrote have it importing Excel spreadsheet data using cell by cell, row by row method. This is fully automated so the user can choose whatever spreadsheet they want to import and press a button which sits on a VB6 frontend. This has been good for that situsation but it can be very slow when there
1
3682
by: sparks | last post by:
I have never done this and wanted to ask people who have what is the best way. One person said import it to excel, then import it into access table. but since this will be done a lot, I am trying to avoid this extra step. can access read in this file directly into a table as append data? thank you very much for any pointers
8
2553
by: harry | last post by:
Hi Folks: I'm trying to do something that looks simple, but I can't make it work right. It's Access 2000 on a Win2000 computer. I create a database with 5 columbs. The data I need to import is text. The way it's formatted is one line each field, for the 5 fields, then to the next record. The text file looks like this: WPTJ410
2
3613
by: nutthatch | last post by:
I want to be able to import an Excel spreadsheet into Access 2K using the macro command Transferspreadsheet. However, the file I am importing (over which I have no control) contains some records that are "dirty" i.e. the field contents do not comply with the expected format (date/time) and they end up in a seperate table of import errors. (The records in "error" are actually empty fields.) This is a regular event and I do not want to...
2
3185
by: Snozz | last post by:
The short of it: If you needed to import a CSV file of a certain structure on a regular basis(say 32 csv files, each to one a table in 32 databases), what would be your first instinct on how to set this up so as to do it reliably and minimize overhead? There are currently no constraints on the destination table. Assume the user or some configuration specifies the database name, server name, and filename+fullpath. The server is SQL...
5
3179
by: hharriel | last post by:
Hi, I am hoping someone can help me with an issue I am having with excel and ms access. I have collected data (which are in individual excel files) from 49 different school districts. All districts have used the same excel template and populated the same 32 data fields (columns). I created one large excel file from all 49 files which gives me a master table of 60,000 or so records. I have tried to import this master table into access...
0
1628
by: upadhyayanuj | last post by:
Hi I have an error while uploading file and then importing it into my sql table The process cannot access the file 'c:\inetpub\wwwroot\FlowLine\Excel File\Fan_Details.xls' because it is being used by another process Now Some times its run successfully, i don't no how but somtimes it gives error, I figure out there is security issue of the folder where its storing the file, But i had given all right to user there
0
1136
by: aoztuncer | last post by:
I can import data from Excel using the following code if the spreadsheet is saved on the computer and has a non-empty path name: string connStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + oXL.ActiveWorkbook.Path + "\\" + oXL.ActiveWorkbook.Name + ";" + "Extended Properties=Excel 8.0"; OleDbCommand cmdSelect = new OleDbCommand("SELECT * FROM ", conn); However, if the running instance of Excel is not saved on the computer and has...
0
10456
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10230
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10012
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9052
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7548
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5442
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.