Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2008
    Posts
    1

    Question Unanswered: 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.

  2. #2
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •