Microsoft.Office.Interop.Excel

Discussion in 'ASP .Net' started by wendell_lucas@hotmail.com, Jun 26, 2007.

  1. Guest

    Hi,
    I have an ASP.NET application that creates reports in Excel. It works
    fine in development but not on our production Windows 2003 server
    running IIS 6.0 Excel does not show up. I had a DCOM access error
    which was fixed by giving Network Service Local Launch and Activation
    Permissions. The application runs now but Excel does open up. I don't
    see it as a process on the server either. Office 2003 was recently
    installed on the server for this application. Has anyone had a problem
    like this?

    Thanks,
    Wendell
     
    , Jun 26, 2007
    #1
    1. Advertising

  2. Mark Rae Guest

    Mark Rae, Jun 26, 2007
    #2
    1. Advertising

  3. Maybe is too late for this advise...

    Office interop is not recommeded for ASP .net application:

    http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2

    Too dangerous to have it on server side applicatons.

    You could use XMLSS, or other lite approached.

    Good luck
    Braulio



    /// ------------------------------
    /// Braulio Díez
    ///
    /// http://www.tipsdotnet.com
    /// ------------------------------




    "" wrote:

    > Hi,
    > I have an ASP.NET application that creates reports in Excel. It works
    > fine in development but not on our production Windows 2003 server
    > running IIS 6.0 Excel does not show up. I had a DCOM access error
    > which was fixed by giving Network Service Local Launch and Activation
    > Permissions. The application runs now but Excel does open up. I don't
    > see it as a process on the server either. Office 2003 was recently
    > installed on the server for this application. Has anyone had a problem
    > like this?
    >
    > Thanks,
    > Wendell
    >
    >
     
    =?Utf-8?B?QnJhdWxpbyBEaWV6?=, Jun 27, 2007
    #3
  4. Guest

    On Jun 27, 7:10 am, Braulio Diez <> wrote:
    > Maybe is too late for this advise...
    >
    > Office interop is not recommeded for ASP .net application:
    >
    > http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2
    >
    > Too dangerous to have it on server side applicatons.
    >
    > You could use XMLSS, or other lite approached.
    >
    > Good luck
    > Braulio
    >
    > /// ------------------------------
    > /// Braulio Díez
    > ///
    > ///http://www.tipsdotnet.com
    > /// ------------------------------
    >
    >
    >
    > "" wrote:
    > > Hi,
    > > I have an ASP.NET application that creates reports in Excel. It works
    > > fine in development but not on our production Windows 2003 server
    > > running IIS 6.0 Excel does not show up. I had a DCOM access error
    > > which was fixed by giving Network Service Local Launch and Activation
    > > Permissions. The application runs now but Excel does open up. I don't
    > > see it as a process on the server either. Office 2003 was recently
    > > installed on the server for this application. Has anyone had a problem
    > > like this?

    >
    > > Thanks,
    > > Wendell- Hide quoted text -

    >
    > - Show quoted text -


    Thanks, for your quick replys. After reading the suggested articles,
    it seems clear that we shall have to go to XML or a 3rd party tool
    going forward. Unfortunately, it is too late to change directions for
    this initial piece of the project. Do you have any idea why Excel is
    not availible when running the application from the server?

    Thanks,
    Wendell
     
    , Jun 27, 2007
    #4
  5. Mark Rae Guest

    <> wrote in message
    news:...

    > After reading the suggested articles, it seems clear that we shall
    > have to go to XML or a 3rd party tool going forward.
    > Unfortunately, it is too late to change directions for this initial
    > piece of the project.


    Moving from Office Automation to Aspose is simplicity itself - they have
    deliberately made their object model resemble the Office object model as
    closely as possible precisely for this reason...

    > Do you have any idea why Excel is not availible when
    > running the application from the server?


    Excel, as with the rest of Office, was simply not designed to be run in this
    way.

    The main reason is to do with threading, but there are others...


    --
    http://www.markrae.net
     
    Mark Rae, Jun 27, 2007
    #5
  6. I think somebody in a previoius thread has pointed the official Ms doc. about
    how to configure Excel automation on ASP .net.

    Mmmm... anyway take a look at this link, I think it give good tips:

    http://www.eggheadcafe.com/articles/20021012.asp

    Good luck
    Braulio

    /// ------------------------------
    /// Braulio Díez
    ///
    /// http://www.tipsdotnet.com
    /// ------------------------------




    "" wrote:

    > On Jun 27, 7:10 am, Braulio Diez <> wrote:
    > > Maybe is too late for this advise...
    > >
    > > Office interop is not recommeded for ASP .net application:
    > >
    > > http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2
    > >
    > > Too dangerous to have it on server side applicatons.
    > >
    > > You could use XMLSS, or other lite approached.
    > >
    > > Good luck
    > > Braulio
    > >
    > > /// ------------------------------
    > > /// Braulio Dmez
    > > ///
    > > ///http://www.tipsdotnet.com
    > > /// ------------------------------
    > >
    > >
    > >
    > > "" wrote:
    > > > Hi,
    > > > I have an ASP.NET application that creates reports in Excel. It works
    > > > fine in development but not on our production Windows 2003 server
    > > > running IIS 6.0 Excel does not show up. I had a DCOM access error
    > > > which was fixed by giving Network Service Local Launch and Activation
    > > > Permissions. The application runs now but Excel does open up. I don't
    > > > see it as a process on the server either. Office 2003 was recently
    > > > installed on the server for this application. Has anyone had a problem
    > > > like this?

    > >
    > > > Thanks,
    > > > Wendell- Hide quoted text -

    > >
    > > - Show quoted text -

    >
    > Thanks, for your quick replys. After reading the suggested articles,
    > it seems clear that we shall have to go to XML or a 3rd party tool
    > going forward. Unfortunately, it is too late to change directions for
    > this initial piece of the project. Do you have any idea why Excel is
    > not availible when running the application from the server?
    >
    > Thanks,
    > Wendell
    >
    >
     
    =?Utf-8?B?QnJhdWxpbyBEaWV6?=, Jun 28, 2007
    #6
  7. Mark Rae Guest

    "Braulio Diez" <> wrote in message
    news:...

    > I think somebody in a previoius thread has pointed the official Ms doc.
    > about
    > how to configure Excel automation on ASP .net.


    Which also include, in bold, a warning that Microsoft will not support any
    solution which tries to use server-side automation because it doesn't
    work...

    > Mmmm... anyway take a look at this link, I think it give good tips:
    >
    > http://www.eggheadcafe.com/articles/20021012.asp


    On the contrary - it demonstrates server-side automation, so should be
    ignored...


    --
    http://www.markrae.net
     
    Mark Rae, Jun 28, 2007
    #7
  8. Guest

    On Jun 28, 2:06 am, Braulio Diez <> wrote:
    > I think somebody in a previoius thread has pointed the official Ms doc. about
    > how to configure Excel automation on ASP .net.
    >
    > Mmmm... anyway take a look at this link, I think it give good tips:
    >
    > http://www.eggheadcafe.com/articles/20021012.asp
    >
    > Good luck
    > Braulio
    >
    > /// ------------------------------
    > /// Braulio Díez
    > ///
    > ///http://www.tipsdotnet.com
    > /// ------------------------------
    >
    >
    >
    > "" wrote:
    > > On Jun 27, 7:10 am, Braulio Diez <> wrote:
    > > > Maybe is too late for this advise...

    >
    > > > Office interop is not recommeded for ASP .net application:

    >
    > > >http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2

    >
    > > > Too dangerous to have it on server side applicatons.

    >
    > > > You could use XMLSS, or other lite approached.

    >
    > > > Good luck
    > > > Braulio

    >
    > > > /// ------------------------------
    > > > /// Braulio Dmez
    > > > ///
    > > > ///http://www.tipsdotnet.com
    > > > /// ------------------------------

    >
    > > > "" wrote:
    > > > > Hi,
    > > > > I have an ASP.NET application that creates reports in Excel. It works
    > > > > fine in development but not on our production Windows 2003 server
    > > > > running IIS 6.0 Excel does not show up. I had a DCOM access error
    > > > > which was fixed by giving Network Service Local Launch and Activation
    > > > > Permissions. The application runs now but Excel does open up. I don't
    > > > > see it as a process on the server either. Office 2003 was recently
    > > > > installed on the server for this application. Has anyone had a problem
    > > > > like this?

    >
    > > > > Thanks,
    > > > > Wendell- Hide quoted text -

    >
    > > > - Show quoted text -

    >
    > > Thanks, for your quick replys. After reading the suggested articles,
    > > it seems clear that we shall have to go to XML or a 3rd party tool
    > > going forward. Unfortunately, it is too late to change directions for
    > > this initial piece of the project. Do you have any idea why Excel is
    > > not availible when running the application from the server?

    >
    > > Thanks,
    > > Wendell- Hide quoted text -

    >
    > - Show quoted text -


    Braulio, that is a good article. It sould get us over.
    Thanks all for your help.
    Wendell
     
    , Jun 28, 2007
    #8
  9. Mark Rae Guest

    <> wrote in message
    news:...

    > Braulio, that is a good article. It sould get us over.


    Sigh...

    The code in that article uses server-side automation.

    THERE IS A VERY STRONG POSSIBILITY THAT IT WILL NOT WORK!!!!!


    --
    http://www.markrae.net
     
    Mark Rae, Jun 28, 2007
    #9
  10. re:
    !> THERE IS A VERY STRONG POSSIBILITY THAT IT WILL NOT WORK!!!!!

    Or worse, that it *will* work...screwing up the server in any of a zillion ways.

    <g, d & r...>





    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en español : http://asp.net.do/foros/
    ======================================
    "Mark Rae" <> wrote in message news:...
    > <> wrote in message news:...
    >
    >> Braulio, that is a good article. It sould get us over.

    >
    > Sigh...
    >
    > The code in that article uses server-side automation.
    > THERE IS A VERY STRONG POSSIBILITY THAT IT WILL NOT WORK!!!!!
     
    Juan T. Llibre, Jun 28, 2007
    #10
  11. Cika Pero Guest

    Hi,

    maybe you could try some 3rd party alternative. I am using this <a href="http://www.gemboxsoftware.com/GBSpreadsheet.htm">Excel C#</a> library in my <a href="http://www.gemboxsoftware.com/LA/ASP-.NET-Excel.htm">Excel ASP.NET</a> and it is running well.

    Here is a sample code how to use it:

    DataTable people = (DataTable)Session["people"];
    // Create excel file.
    ExcelFile ef = new ExcelFile();
    ExcelWorksheet ws = ef.Worksheets.Add("DataSheet");
    ws.InsertDataTable(people, "A1", true);

    Response.Clear();

    // Stream file to browser, in required type.
    switch (this.RadioButtonList1.SelectedValue)
    {
    case "XLS":
    Response.ContentType = "application/vnd.ms-excel";
    Response.AddHeader("Content-Disposition", "attachment; filename="
    + "Report.xls");
    ef.SaveXls(Response.OutputStream);
    break;

    case "XLSX":
    Response.ContentType = "application/vnd.openxmlformats";
    Response.AddHeader("Content-Disposition", "attachment; filename="
    + "Report.xlsx");
    // With XLSX it is a bit more complicated as MS Packaging API
    // can't write directly to Response.OutputStream.
    // Therefore we use temporary MemoryStream.
    MemoryStream ms = new MemoryStream();
    ef.SaveXlsx(ms);
    ms.WriteTo(Response.OutputStream);
    break;
    }

    Response.End();


    > On Tuesday, June 26, 2007 3:56 PM wendell_luca wrote:


    > Hi,
    > I have an ASP.NET application that creates reports in Excel. It works
    > fine in development but not on our production Windows 2003 server
    > running IIS 6.0 Excel does not show up. I had a DCOM access error
    > which was fixed by giving Network Service Local Launch and Activation
    > Permissions. The application runs now but Excel does open up. I don't
    > see it as a process on the server either. Office 2003 was recently
    > installed on the server for this application. Has anyone had a problem
    > like this?
    >
    > Thanks,
    > Wendell



    >> On Tuesday, June 26, 2007 5:00 PM Mark Rae wrote:


    >> <> wrote in message
    >> news:...
    >>
    >>
    >> Server-side Office automation does not work, and Microsoft does not support
    >> it:
    >> http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2
    >>
    >> You'll need to come up with a different solution e.g.:
    >> http://www.aspose.com/Products/Aspose.Cells/Default.aspx
    >>
    >>
    >> --
    >> http://www.markrae.net



    >>> On Wednesday, June 27, 2007 7:10 AM braulio121NOSPA wrote:


    >>> Maybe is too late for this advise...
    >>>
    >>> Office interop is not recommeded for ASP .net application:
    >>>
    >>> http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2
    >>>
    >>> Too dangerous to have it on server side applicatons.
    >>>
    >>> You could use XMLSS, or other lite approached.
    >>>
    >>> Good luck
    >>> Braulio
    >>>
    >>>
    >>>
    >>> /// ------------------------------
    >>> /// Braulio Díez
    >>> ///
    >>> /// http://www.tipsdotnet.com
    >>> /// ------------------------------
    >>>
    >>>
    >>>
    >>>
    >>> "" wrote:



    >>>> On Wednesday, June 27, 2007 1:52 PM wendell_luca wrote:


    >>>> On Jun 27, 7:10 am, Braulio Diez <> wrote:
    >>>>
    >>>> Thanks, for your quick replys. After reading the suggested articles,
    >>>> it seems clear that we shall have to go to XML or a 3rd party tool
    >>>> going forward. Unfortunately, it is too late to change directions for
    >>>> this initial piece of the project. Do you have any idea why Excel is
    >>>> not availible when running the application from the server?
    >>>>
    >>>> Thanks,
    >>>> Wendell



    >>>>> On Wednesday, June 27, 2007 2:29 PM Mark Rae wrote:


    >>>>> <> wrote in message
    >>>>> news:...
    >>>>>
    >>>>>
    >>>>> Moving from Office Automation to Aspose is simplicity itself - they have
    >>>>> deliberately made their object model resemble the Office object model as
    >>>>> closely as possible precisely for this reason...
    >>>>>
    >>>>>
    >>>>> Excel, as with the rest of Office, was simply not designed to be run in this
    >>>>> way.
    >>>>>
    >>>>> The main reason is to do with threading, but there are others...
    >>>>>
    >>>>>
    >>>>> --
    >>>>> http://www.markrae.net



    >>>>>> On Thursday, June 28, 2007 2:06 AM braulio121NOSPA wrote:


    >>>>>> I think somebody in a previoius thread has pointed the official Ms doc. about
    >>>>>> how to configure Excel automation on ASP .net.
    >>>>>>
    >>>>>> Mmmm... anyway take a look at this link, I think it give good tips:
    >>>>>>
    >>>>>> http://www.eggheadcafe.com/articles/20021012.asp
    >>>>>>
    >>>>>> Good luck
    >>>>>> Braulio
    >>>>>>
    >>>>>> /// ------------------------------
    >>>>>> /// Braulio Díez
    >>>>>> ///
    >>>>>> /// http://www.tipsdotnet.com
    >>>>>> /// ------------------------------
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>> "" wrote:
     
    Cika Pero, Apr 6, 2011
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. bracoute

    Microsoft Office Interop word dll

    bracoute, Jul 5, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    4,333
    anastasia
    Jul 5, 2003
  2. Stephen Noronha

    Microsoft.Office.Interop.Outlook.Application

    Stephen Noronha, Sep 29, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    11,069
    Lucas Tam
    Sep 29, 2005
  3. Replies:
    1
    Views:
    772
    Bruce Barker
    Oct 10, 2005
  4. Simon
    Replies:
    2
    Views:
    3,281
    Simon
    Oct 28, 2005
  5. =?Utf-8?B?RGVubmlzIEc=?=

    error 80070003 while using Microsoft.office.Interop.visio

    =?Utf-8?B?RGVubmlzIEc=?=, Nov 1, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    1,038
    =?Utf-8?B?RGVubmlzIEc=?=
    Nov 1, 2006
Loading...

Share This Page