ASP 101 - Active Server Pages 101 - Web06
The Place ASP Developers Go!

Please visit our partners

Windows Technology Windows Technology
15 Seconds
ASP 101
ASP Wire
VB Forums
VB Wire
internet.commerce internet.commerce
Partners & Affiliates

ASP 101 is an site
ASP 101 is an site
Internet News
Small Business
Personal Technology

Corporate Info
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash

ASP Source Code:
' Tells the browser to use Excel to open the file
Response.ContentType = "application/"
' Your data can come from ANYWHERE! Since that's not the
' point of this sample, I'm just hand writing a table
' below, but it could easily be generated from a database
' as illustrated in some of our other samples.
' Everything that follows is plain HTML... what you see
' in Excel is based on Excel's interpretation of it.
' It picks up the formulas and emulates the formatting
' pretty well...
 <td><font color="red">=sum(a2:b2)</font></td>
			<th bgcolor="blue"><font color="white">Name</font></th>
			<th bgcolor="blue"><font color="white">Sales</font></th>
			<th bgcolor="blue"><font color="white">Commission</font></th>
			<td>David Andersen</td>
			<td>=(B2 * 0.05)</td>
			<td>Laura Callahan</td>
			<td>=(B3 * 0.05)</td>
			<td>Frank Edwards</td>
			<td>=(B4 * 0.05)</td>
			<td>Chris Graham</td>
			<td>=(B5 * 0.05)</td>
			<td>Owen Ingraham</td>
			<td>=(B6 * 0.05)</td>
			<td>Robert King</td>
			<td>=(B7 * 0.05)</td>
			<td>Greg Miller</td>
			<td>=(B8 * 0.05)</td>
			<td>Ian Ostrander</td>
			<td>=(B9 * 0.05)</td>
			<td>Howard Quinn</td>
			<td>=(B10 * 0.05)</td>
			<td>Tammy Steel</td>
			<td>=(B11 * 0.05)</td>
			<td>Debra Underwood</td>
			<td>=(B12 * 0.05)</td>
			<td>Mark White</td>
			<td>=(B13 * 0.05)</td>
			<td>Quincy Youngs</td>
			<td>=(B14 * 0.05)</td>
			<td><strong><font color="blue">Totals:</font></strong></td>
			<td><font color="red">=SUM(B2:B14)</font></td>
			<td><font color="red">=SUM(C2:C14)</font></td>

Back the the Sample Output

Back to the Sample Index

Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback
The Network for Technology Professionals



Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers