Microsoft Excel cannot access the file "the file name or path does not exist. • Files are being used by other programs. • The workbook you want to save has the same name as the one currently opened.

Source: Internet
Author: User

Microsoft Office Excel cannot access the file "D: \ wwwroot \ kobelcosh \ webui \ exceltemplate \ quote5.xls ". Possible causes: 1. The file name or path does not exist.
2 files are being used by other programs.
3. The workbook you want to save has the same name as the one currently opened.
Note: An unhandled exception occurs during the execution of the current Web request. Check the stack trace information for details about the error and the source of the error in the code. Exception details: system. runtime. interopservices. comexception: Microsoft Office Excel cannot access the file "D: \ wwwroot \ kobelcosh \ webui \ exceltemplate \ quote5.xls ". Possible causes: 1. The file name or path does not exist.
2 files are being used by other programs.
3. The workbook you want to save has the same name as the one currently opened. Source error: an unprocessed exception is generated during the execution of the current Web request. You can use the following exception stack trace information to determine the cause and location of the exception. Stack trace: [comexception (0x800a03ec): Microsoft Office Excel cannot access the file "D: \ wwwroot \ kobelcosh \ webui \ exceltemplate \ quote5.xls ". Possible causes include :? The file name or path does not exist.
? Files are being used by other programs.
? The workbook you want to save has the same name as the one currently opened.]
Microsoft. Office. InterOP. Excel. workbooks. Add (Object template) + 0
Kobelco. webui. callback (string lblmachinemodel, string lbphone, string lblfax, string algorithm, string algorithm, 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 solution:
1.
1) Add a simulation to webconfig and add the Administrator permission,
<Identity impersonate = "true" username = "System Administrator" Password = "system administrator password"/>
2). In this way, you can start the application process, operate on Excel, and create and export Excel files. However, you still cannot open Excel files on the server.

2.
In component service, docm sets Microsoft Excel application attributes,
Because the operation is performed on a 64-bit system, docom does not exist in the component service by default. Because Microsoft Excel application is a 32-bit DCOM configuration, the solution is as follows (refer to Step 3) 3.
1). Start --> Run --> cmd
2) Enter MMC-32 at the command prompt to open the 32 console.
3) In the File menu, add or delete a management unit --> component service
4) In "DCOM configuration", find "Microsoft Excel application", right-click it, and then click "properties". The "Microsoft Excel application properties" dialog box is displayed.
5) Click the "ID" tab and select "Interactive User"
6 ). click the "Security" tab, click "Custom" on "Start and activate Permissions", and then click the corresponding "edit" button, in the pop-up "security" dialog box, add a "Network Service" user (note that you must select the computer name) and grant it the "local start" and "Local activation" permissions.
7 ). still "security" label, click "Custom" on "Access Permissions", and then click "edit ", in the pop-up "security" dialog box, add a "Network Service" user and grant "local access" permission.

4. Restart IIS and pass the test.

For iis7 + win2008 R2, modify the preceding attributes in the Excel application of the component service.

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.