Programming Excel is actually to call the Excel COM component through. NET Framework. All COM components that need to be called in the web environment need to be configured accordingly.
Many of my friends have reported that debugging a normal program in a Windows environment leads to errors in the Web environment. This step is missing.
The following describes the DCOM configuration process in detail.
1. Run "dcomcnfg" and open the DCOM configuration program. (Or start → set → Control Panel → Administrative Tools → Component Services → computer → my computer → DCOM configuration)
2. In the Application List, find "Microsoft Excel application" and click "properties". If no attribute is found under 2003, patch SP2.
3. Set "authentication level" on the "General" tab to "NONE ".
4. Select "use custom configuration permission" on the "Security" tab and click "edit ".
5. In the displayed dialog box, add "Internet Guest user" (generally IUSR _ machine name) and set the access type to "full control ".
6. Set the user on the "Identity" tab to "Interactive User ".
7. Click "application" to close the property page and DCOM configuration program. Configuration complete