Use COM Imports Microsoft.Office.Interop.Excel

Last post 05-14-2007 5:26 AM by Ken Tucker. 1 replies.

Sort Posts:

  • Use COM Imports Microsoft.Office.Interop.Excel

    05-13-2007, 11:45 PM
    • Loading...
    • utardylan
    • Joined on 05-10-2007, 12:58 PM
    • Posts 35

    I'm using  VS.NET 2003, Framework 1.1 , window 2000, Mircosoft Office XP.

    I download the COM Microsoft.Office.Interop.Excel.DLL from the official Web.

    Here is my sample code :

    **********************************************************************************************

     imports Microsoft.Office.Interop.Excel

    Dim excel As Microsoft.Office.Interop.Excel.Application
    Dim wb As Microsoft.Office.Interop.Excel.Workbook

    excel = New Microsoft.Office.Interop.Excel.Application
    wb = excel.Workbooks.Open("c:\\test.xls")
    excel.Visible = True
    wb.Activate()
    *********************************************************************************************
    I build in Window base application  mean VB.NET is work fine.
    But when i Build in Web application ASP.NET 
    It wont call up the test.xls  and the EXCEL.EXE  wont neve release.
     
    Please give me a hand please.....
    Regards,
    Dylan
  • Re: Use COM Imports Microsoft.Office.Interop.Excel

    05-14-2007, 5:26 AM
    Answer
    You should never automate excel(or any office program) from a website.  You should reponse.redirect("test.xlx") to get the spreadsheet to open up in the browser
Page 1 of 1 (2 items)
Microsoft Communities
Page view counter