Also talk about the response attribute in the ASP

xiaoxiao2021-03-18  193

Also talk about the response attribute in the ASP

When I went shopping at will, I saw the article "ASP with the response attribute", I remembered an abroad-related article that I saw before, I didn't dare to share it, and I was shared with you. The debug is passed, but some use English, please also include you. What is said to be in the form of an ASP page to convert into an Excel form, everyone still remembers that there have been prawn to say the form of DLL to solve it, but so that this is slower for big data. If the method introduced in text, the resources of the server will not occupy the server, just open at the client. There is also a benefit: what is the form in the page in the page, what is the form in Excel? Ok, tell an exciting message, except for table data, in Excel, the icon button, etc. is not displayed. In this way, everyone's webpage printing problem is simply a lot. Less nonsense, enter the topic. In order to create a dynamic Excel report, you must first write in an ASP file: <% response.contenttype = "Application / VND.MS-EXCEL"%> (Remember: This sentence must be written in the beginning of the article Otherwise, 嘿 ...) This sentence is to tell the browser's next code is Excel format, then the browser will prompt you for Save or Open file, then you can open or save it.

Look at one example: <% response.contentType = "Application / vnd.ms-excel"%>

converted by ASP page to Excel report < % for i = 1 to 8%>

<% = 1 * i%> <% = 2 * i%> <% = 3 * i% > <% = 4 * i%> <% = 5 * i%> <% = 6 * i%> <% = 7 * I%> <% = 8 * I%> <% = 9 * i%> <

/ TD>

<% = 10 * i%> <% = 11 * I%> <% = 12 * i%> <% next%>
= SUM (A2: A2: A9) = SUM (B2: B) = SUM (C2: C9) = SUM (D2: D9) = SUM (E2: E9) = SUM (F2: F9) = SUM (G2: G9) = sum (h2: h9) = sum (i2: i9) = sum (j2: j9) = SUM (K2: K9) = SUM (L2: L9)

转载请注明原文地址:https://www.9cbs.com/read-129746.html


New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.042, SQL: 9