Microsoft Office Excel cannot access files

Source: Internet
Author: User
Tags stack trace administrator password

Microsoft Office Excel cannot access the file "Quote5.xls". Possible causes are: 1 The file name or path does not exist.
2 file is being used by another program.
3 The workbook you are trying to save has the same name as the currently open workbook.
Description: An unhandled exception occurred during the execution of the current WEB request. Check the stack trace information For more information about the error and the source of the error in your code. Exception Details: System.Runtime.InteropServices.COMException:Microsoft Office Excel cannot access the file "D:\WWWRoot\KOBELCOSH\WebUI\ Exceltemplate\quote5.xls ". Possible causes are: 1 The file name or path does not exist.
2 file is being used by another program.
3 The workbook you are trying to save has the same name as the currently open workbook. SOURCE Error: An unhandled exception was generated during the execution of the current WEB request. You can use the following exception stack trace information to determine information about the cause of the exception and where it occurred. Stack trace:
[COMException (0X800A03EC): Microsoft Office Excel cannot access the file "". The possible causes are:? The file name or path does not exist.
? The file is being used by another program.
? The workbook you are trying to save has the same name as the currently open workbook. ]
MICROSOFT.OFFICE.INTEROP.EXCEL.WORKBOOKS.ADD (Object Template) +0
Kobelco. WebUI.Quote5.OutputExcel (String Lblmachinemodel, String Lbphone, String Lblfax, String LBLCUSTOMERNAMECN, String Lblagentnamea, String Lblagentphonea, String Lblusemodel, String lblcomment) in D:\Mingyou\KOBELCOSH\Kobelco\WebUI\ quote5.aspx.cs:38
Kobelco. WebUI.Quote5.gvResult_SelectedIndexChanging (Object sender, GridViewSelectEventArgs e) in D:\Mingyou\KOBELCOSH\ kobelco\webui\quote5.aspx.cs:180
System.Web.UI.WebControls.GridView.OnSelectedIndexChanging (GridViewSelectEventArgs e) +108
System.Web.UI.WebControls.GridView.HandleSelect (Int32 rowIndex) +43
System.Web.UI.WebControls.GridView.HandleEvent (EventArgs E, Boolean causesvalidation, String validationgroup) +197
System.Web.UI.WebControls.GridView.OnBubbleEvent (Object source, EventArgs e) +95
System.Web.UI.Control.RaiseBubbleEvent (Object source, EventArgs args) +37
System.Web.UI.WebControls.GridViewRow.OnBubbleEvent (Object source, EventArgs e) +123
System.Web.UI.Control.RaiseBubbleEvent (Object source, EventArgs args) +37
System.Web.UI.WebControls.LinkButton.OnCommand (CommandEventArgs e) +118
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent (String eventargument) +135
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent (String eventargument) +10
System.Web.UI.Page.RaisePostBackEvent (IPostBackEventHandler sourcecontrol, String eventargument) +13
System.Web.UI.Page.RaisePostBackEvent (NameValueCollection postdata) +175
System.Web.UI.Page.ProcessRequestMain (Boolean includestagesbeforeasyncpoint, Boolean includestagesafterasyncpoint ) +1565 Workaround:
1.
1). Add the administrator privileges by adding impersonation to the Webconfig
<identity impersonate= "True" username= "system Administrator" password= "system Administrator password"/>
2). This will enable you to start the application process, manipulate Excel, create new Excel, export Excel, but still not open the server-side Excel file

2.
In Component Services, DOCM sets the properties of Microsoft Excel application,
Because it is operating on a 64-bit system, there is no default in docom in Component Services because Microsoft Excel application is a 32 DCOM configuration and is resolved as follows (see step three)
3.
1). Start--〉 Run--〉cmd
2) at the command prompt, enter comexp.msc-32 and open the 32 console
3). File menu, add Remove Snap-in--〉 component service
4). In the DCOM configuration, locate the Microsoft Excel application, right-click on it, and then click Properties to pop up the Microsoft Excel Application Properties dialog box
5). Click on the "Logo" tab and select "Interactive User"
6). Click on the "Security" tab, click "Customize" on "Launch and Activation Permissions", then click on the corresponding "edit" button to add a "NETWORK SERVICE" user in the "Security" dialog box (note To select this computer name) and give it "local launch" and "local activation The permissions
7). Remain the "Security" tab, click "Customize" on "Access", then click "Edit" and add a "NETWORK SERVICE" user to the "Security" dialog box that appears, then give "Local access" permission.

4. Restart IIS, test through

Transferred from: http://www.360doc.com/content/11/1009/16/7622695_154644394.shtml

Microsoft Office Excel cannot access files

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.