If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Embed the existing excel sheet in an .aspx form with .aspx.cs language(C#)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-17-08, 05:31
moni1019 moni1019 is offline
Registered User
 
Join Date: Jan 2008
Posts: 1
Question Embed the existing excel sheet in an .aspx form with .aspx.cs language(C#)

In Visual Studio .NET Evironment, I have selected "Microsoft Excel Spreadsheet 11.0 control" and added that into ASP.NET form. Now I have to use C# language to open an existing Excel file into the newly added control on a button click. But opening an existing Excel file into the control is a challenge to me.

I tried very hard to get any method to open existing excel in our "Microsoft office spreadsheet 11.0 control"..used object browser/intellisense..but no luck.

The added control is not recognised in the .aspx.cs page, to bind/open.


Added Reference: Microsoft Excel 11.0 Object library from COM tab, this has included a "Interop.Excel.dll" into the bin folder and in the project reference.

Can anybody suggest me what should I do to proceed further to bind the excel into the control Please??? Waiting for a reply...Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 01-17-08, 10:00
Marvels Marvels is offline
Registered User
 
Join Date: Jul 2003
Location: Amsterdam, Nederland
Posts: 449
Re

Quote:
Originally Posted by moni1019
....open an existing Excel file into the newly added control on a button click. But opening an existing Excel file into the control is a challenge to me.

Do you do a :
System.Web.HttpContext.Current.Server.MapPath("C:\ Excel\map1.xls")
otherwise it wont work
Reply With Quote
Reply

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On