Wrox Programmer Forums
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 5th, 2006, 04:44 AM
Authorized User
Join Date: Oct 2004
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kiwibey
Default Read Data from Excel File

dear all,
i have to let client select a excel file.
read the data inside the excel, then insert into database.
please help me find out the solution to solve this problem.
what i wish to know is how to read the data in the excel file.
the process insert to database should be can handle by me.
all the expert programmer please give me a hand
thank you very much

best regards,

Old December 5th, 2006, 11:27 AM
Friend of Wrox
Join Date: Feb 2006
Posts: 116
Thanks: 0
Thanked 0 Times in 0 Posts

You need to download and install OWC 11 (Office Web Components), reference the dll's, and learn about the classes and functions in that library, which allows you to do anything you can do in Excel with your code, such as read in data from the cells of a worksheet.

I am not a fan of these types of assignments and I am of the opinion that the right thing to do would be to create a web form that the user uses to enter the data. How is it any different for the user to enter data in excel as opposed to entering it in a web form? The big difference is now you have to learn how to use this whole new huge library of classes and functions and the data entry process itself will not be improved one bit. In fact unless those excel spreadsheets they are uploading are locked down, they will always have too much ability to rearrange the spreadsheet and create hell and havoc for you.

The other reason I always gag at the excel upload to database requirement is that it doesn't make any sense from a software system perspective. You go through all the trouble the make a web application (and it is more trouble than a windows app) so that you get cross platform compatibility through the mostly universal web browser, and then you create a dependency on a Windows Application, Microsoft Excel, which not everyone has and tie yourself down to one product that isn't cross platform compatible. It doesn't make a lot of sense.

Neil Timmerman
Veris Consulting

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to read data from an excel file diegoblin Beginning VB 6 6 August 31st, 2009 11:04 PM
how to read data from sybase to excel thillaiarasu SQL Language 2 April 20th, 2007 01:34 AM
how can read excel file abrahamchempanal RSS and Atom 0 February 22nd, 2006 10:52 AM
Read Excel File rekha_jsr Classic ASP Basics 2 June 16th, 2005 04:58 AM
Read an uploaded Excel File rekha_jsr Classic ASP Basics 0 June 12th, 2005 10:17 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.