This issue is mainly about permissions.
1: Install the Excel software for office on the server.
2: Enter dcomcnfg.exe in "start"-> "run" to start "Component Service"
3: Double-click "component service"> "computer"> "my computer"> "DCOM configuration"
4: Find the Microsoft Excel application in "DCOM configuration ".Program", Right-click it, and then click" properties "to bring up" Microsoft Excel should
Application Properties dialog box
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 displayed "security" dialog box, enter
A "Network Service" user (note that you must select the computer name), and grant it the "local start" and "Local activation" permissions.
7: the "Security" label is still displayed. Click "Custom" on "Access Permissions", and then click "edit". In the displayed "security" dialog box, add a "network"
Service, and then grant the "local access" permission.
In this way, we have configured the corresponding Excel DCOM permissions.
Note: This is configured on win2003. on 2000 and XP, the network service user is changed to the ASPNET user.