Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 9th, 2006, 10:40 AM
Authorized User
Join Date: Aug 2005
Location: , , .
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default Opening Excel file

hi ther;
please tell me how to open Excel file in asp.net.
The file is on different server
if the file is on localhost it is possible to open it but how it can be done when that file located somewher else?????
  #2 (permalink)  
Old January 21st, 2006, 01:54 PM
Registered User
Join Date: Jan 2006
Location: Allappuzha, Kerala, India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sanajmshaji Send a message via Yahoo to sanajmshaji

Create a data grid and name it as dg and add the following code to Load event of the web page
It will work fine and see the result

Dim connstr As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\datatest.xls;Extended Properties=Excel 8.0;"
        Dim objConn As New OleDbConnection(connstr)
        Dim objadap As New OleDbDataAdapter("SELECT * FROM Range1", objConn)
        Dim ds As New DataSet
        objadap.Fill(ds, "ExcelData")
        dg.DataSource = ds.Tables(0).DefaultView


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening an excel file with VBA TwEaKFrEaK Excel VBA 6 May 23rd, 2014 12:08 PM
Problem in opening excel file in MS Excel 2000 kallol Visual C++ 0 November 16th, 2007 05:48 AM
Opening an Excel file in OWC10.AxSpreadSheet ashu_from_india Visual Studio 2005 0 May 31st, 2007 06:32 AM
Opening Modifying Printing excel File alireza Excel VBA 3 November 18th, 2006 12:59 PM

All times are GMT -4. The time now is 01:49 PM.

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