TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
saravanan m
NA
9
0
Need to read data from Microsoft Excel using asp.net with c#
Feb 17 2006 8:53 AM
Hi, I need to extract a column from a Excel using Asp.Net and C#. That column datas to be used as an input for a particular task.. I have pasted the codings... Please help me... If i execute the project, only column name is displayed... Code: private void mymethod() { try { string sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source="+ Server.MapPath("Dnb_Pro.xls")+";"+ "Extended Properties=Excel 8.0;"; OleDbConnection objConn = new OleDbConnection(sConnectionString); objConn.Open (); OleDbCommand objCmdSelect = new OleDbCommand("Select * from Phone_Number",objConn); OleDbDataAdapter objAdapter1 = new OleDbDataAdapter(); objAdapter1.SelectCommand = objCmdSelect; DataSet objDataSet1 = new DataSet(); objAdapter1.Fill(objDataSet1); DataGrid1.DataSource = objDataSet1.Tables[0].DefaultView; DataGrid1.DataBind(); objConn.Close(); } catch(OleDbException ex) { throw ex; } } Pls do reply soon Regards, Saravanan.M
Reply
Answers (
0
)
Capturing Javascript.Window.Prompt values in ASP,NET
ASP.Net and PayFlow?