Evaluation of all methods for exporting Excel tables using ASP

Source: Internet
Author: User

1. Create an Excel Object in Js.
Because of the security considerations, the client browser is almost impossible to directly execute by default. You have to make multiple settings. can you allow each user to set Internet Options according to your requirements?

2. Export CSV files. However, the CSV file is in text format. If you modify the content format and save it again, a dialog box is displayed, prompting you that the format cannot be saved. This is not appropriate, but this applies to reports and the like without manual secondary modification.

3. Export the xls file of the tab interval. Although the suffix is xls, it is still a plain text file with no format, which is similar to the above problem.

4. Export HTML-format XLS files. The suffix name is xls, which is the optimal method. Because of the format tag, it is actually HTML. According to a lot of information, the export size is limited. In addition, special elements are inserted. For example, after an image is pasted, a folder is generated next to the xls file, which contains the image file. Add the following content to the end of ASP code:
Response. contenttype = "application/MS-excel"
Response. addheader "content-disposition", "attachment?filename=www.xls"

5. Place a template on the server. When the database is connected, write data, and write the template, point to download. This seems troublesome, and problems may occur if many users perform operations. Copying a copy also occupies a lot of resources and serves as a database connection operation. It does not rule out the possibility of conflicts in this process.

6. directly create the application. Excel object on the server and then operate? This example is not found. I don't know if it is feasible. It seems that this will occupy the server resources too. There will be a lot of Excel processes started in the background, and it is unclear whether the IIS server supports direct creation of this object? However, ASP virtual space generally prohibits such operations. Reference: http://blog.csdn.net/jinhuiSystem/article/details/6144266

7. using third-party plug-ins does not seem ideal, either on the client or on the server.

 

Reference: http://topic.csdn.net/u/20110116/22/11e0e6a1-0e9c-4231-a367-78fdaa56b27e.html

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: info-contact@alibabacloud.com 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.