'Document not saved' error - excel workbook

Discussion in 'ASP .Net' started by philip herman, Jul 11, 2003.

  1. Tried everything including allowing full control to ASPNET user to
    folder containing workbook but stiil get
    'System.Runtime.InteropServices.COMException: Document not saved'
    exception. Any ideas?


    ApplicationClass excapp = new ApplicationClass();

    WorkbookClass wb = null;
    string sPath = Request.ApplicationPath + @"\aging.xls";
    wb = (WorkbookClass)excapp.Workbooks.Open(Server.MapPath(sPath),
    Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value);

    excapp.Run((object)Convert.ToString("RunReport"),Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,M
    ssing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value);

    wb.Save();
     
    philip herman, Jul 11, 2003
    #1
    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. =?Utf-8?B?SmltIEhlYXZleQ==?=

    Excel _WorkBook vs. Excel.Workbook

    =?Utf-8?B?SmltIEhlYXZleQ==?=, Sep 29, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    3,645
    Steve C. Orr [MVP, MCSD]
    Sep 29, 2004
  2. Winshent
    Replies:
    0
    Views:
    1,954
    Winshent
    Nov 3, 2004
  3. Yelena Kaplun
    Replies:
    1
    Views:
    5,172
    Yelena Kaplun
    Jan 19, 2005
  4. =?Utf-8?B?TWFyaw==?=

    Error Message Saving Excel Workbook

    =?Utf-8?B?TWFyaw==?=, Dec 2, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    1,645
    David Lloyd
    Dec 3, 2005
  5. kath
    Replies:
    0
    Views:
    516
Loading...

Share This Page