Print reports to Excel under IIS, and print reports to Excel under IIS

Source: Internet
Author: User

Print reports to Excel under IIS, and print reports to Excel under IIS

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.


The words in an EXCEL report are scaled together during preview and printing. Why?

Check whether the page is scaled or not?

It should be 100% in the scaling ratio.

In Beijing, when the income tax offline reporting system prints a report, the system prompts: "An error occurred when an excel file is generated." Import excel "under the execution tool is also

Windows 7 is compatible with tax software and CA certificates. We recommend that you change the Windows XP system.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.