Excel export in windows
Solution: Windows server2008 r2 does not register the Ofiice component
. Use Microsoft. NET. office. interop. when Excel and word are used to operate Excel and Word, the following error occurs: 80070005 when the component whose CLSID is {00024500-0000-0000-C000-000000000046} in the COM class factory is retrieved. Taking Microsoft. Office. Interop. Word as an example, I am running Windows 7 + Office2007 locally.
1: Install Word in Windows 2008 R2/Win7/Win2003/WinXp/win2000 OS. In "component service", choose "component service"> "computer"> "my computer"> "DCOM configuration ". Run "input dcomcnfg.exe to start" component service ".
2: In "DCOM configuration", find "Microsoft Office Word 97-2003 Document", right-click it, and then click "properties ", the "Microsoft Excel application properties" dialog box is displayed. If the environment is Windows 2008 R2, you may not be able to find "Microsoft Office Word 97-2003 documentation ". You can run mmc-32, and a program will pop up. In the menu, select Add/delete management unit and add Component Services. Then, find word under Component Services and perform the following configuration. (Component cache directory c: \ windows \ assembly)
3: In the "ID" tab, select "Interactive User"
4: on 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.
5. On the "Security" tab, click "Custom" on "Access Permissions", and then click "edit ", in the displayed "security" dialog box, add a "network service" user and grant "local access" permission.