Using ASP to transfer HTML format to Excel (3)

Source: Internet
Author: User
Use standard Excel features in HTML tables
Excel 97 allows users to use Excel's operational formulas to implement standard calculations in HTML tables, such as the use of total and sum operations
。 The notable advantage of this feature is that the work tables requiring computational processing are moved to client processing, which greatly reduces the footprint of valuable server resources and reduces the network burden of information delivery between servers and clients. For example, as shown in Figure C, a home page named sumit.asp, an HTML table is created that shows the sum of two columns in an Excel worksheet. Notice the code in code B, where the first line of code converts the content format in the table to Excel format, so the browser will know which type of application is passing data for the HTML table. We created a table with two columns, and the second column contains two sets of values: 2 and 3. The value in the third row is the sum of the first two values, which uses the =sum (B1:B2) calculation feature of Excel.


Figure C

Code B:code for creating a HTML table that displays sum of two columns in Excel worksheet


<%@ Language=vbscript%>

<%response.contenttype = "Application/vnd.ms-excel"%>

<TABLE>
<TR>
<TD></TD>
<TD><!--cell:b1-->2</td>
</TR>
<TR>
<TD></TD>
<TD><!--cell:b2-->3</td>
</TR>
<TR>
<TD><STRONG>Sum</STRONG></TD>
<td>=sum (B1:B2) </TD>
</TR>
</TABLE>


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.