Before reading this article, read the previous article "printing EXCEL reports under. Net".
The previous article "printing EXCEL reports under. Net" introduced how to print reports to excel files. To publish a project through IIS, continue with the following configuration. This article describes how to set up an excel program on the server in IIS. Only when these configurations are configured can the report printing be applied in the actual project.
Step 1:
Install the Excel software for office on the server.
In "start"-> "run", enter dcomcnfg to start "component service ".
Double-click "component service"> "computer"> "my computer"> "DCOM configuration ".
In "DCOM configuration", find "Microsoft Excel application", right-click it, and then click "properties". The "Microsoft Excel application properties" dialog box is displayed.
If Microsoft Office Excel program is installed on your computer and Windows 7 64-bit system, you cannot find "Microsoft Excel application" in "DCOM configuration ". See the following method:
In "start"-> "run", enter comexp. MSC-32 to start "component service", so that you can find "Microsoft Excel application" under "DCOM configuration ".
Step 2:
After opening the Properties dialog box of the Microsoft Excel application, you can modify its security and identity.
Change ID to: Interactive User
Open the security dialog box and set the access permission first. The project is mainly deployed to IIS. You need to set permissions for IIS users.
Click Edit> Add> advanced> query now. Select the IIS user and assign permissions to the user. :
Set the start and activation permissions in the same way as above to complete the permission setting for IIS users.
Step 3:
Publish a project that has no errors during visual studio2010 debugging to IIS.
Browse the default. aspx page and click Print report. You can use other computers in the same LAN to access the test, so that we can easily print the Excel report in the actual project.
Print reports to excel under IIS