DCOM EXCE permission configuration problem

Retrieving the component with CLSID {00024500-0000-0000-C000-000000000046} in the COM class factory failed due to the following error: 80070005;

Regarding the above problem, bloggers have fallen into a huge pit on Baidu, according to the configuration of netizens, as follows:
1. Install the Excel software of office on the server.
2: Enter dcomcnfg.exe in "Start" -> "Run" to start "Component Services"
3: Double-click "Component Services" -> "Computer" -> "My Computer" -> "DCOM Configuration"
4: Find "Microsoft Excel Application" in "DCOM Configuration", click on it Right-click, and then click "Properties" to pop up the "Microsoft Excel Application Properties" dialog box
5: Click the "Identification" tab, select "Interactive User"
6: Click the "Security" tab, click "Launch and Activation Permissions" Customize", then click the corresponding "Edit" button, add a "NETWORK SERVICE" user in the pop-up "Security" dialog box (note to select the computer name), and give it "Local Start" and " Local activation" permission.
7: It is still the "Security" tab, click "Custom" on "Access Permissions", then click "Edit", and add a "NETWORK SERVICE" in the pop-up "Security" dialog box user, and then give "local access" permission;

After the configuration is completed according to the public practices provided by the majority of netizens, it is useless;

以下为博主经过各种尝试,拟写的步骤,亲测可用:
1、首先找到项目中引用的【Microsoft.Office.Interop.Excel.dll】,查看其版本;


2. If EXCEL is not installed, you can download and install the corresponding office version according to this [Microsoft.Office.Interop.Excel.dll] version. If OFFCIE has been installed and the version number is different, please change the reference and the current OFFCIE version Keep it consistent, or reinstall OFFICE according to the current version of [Microsoft.Office.Interop.Excel.dll], in short, it must be consistent; the following is the version comparison table provided by netizens;

3. If the above two points are completed, then you can continue The method of the majority of netizens; otherwise, it is useless to set it;

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324776081&siteId=291194637