% '******************************************************* '* ASP 101 Sample Code - http://www.asp101.com/ * '* * '* This code is made available as a service to our * '* visitors and is provided strictly for the * '* purpose of illustration. * '* * '* http://www.asp101.com/samples/license.asp * '* * '* Please direct all inquiries to webmaster@asp101.com * '******************************************************* %> <% ' Tells the browser to use Excel to open the file Response.ContentType = "application/vnd.ms-excel" ' 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... %>
Name | Sales | Commission |
---|---|---|
David Andersen | 6420 | =(B2 * 0.05) |
Laura Callahan | 3675 | =(B3 * 0.05) |
Frank Edwards | 3840 | =(B4 * 0.05) |
Chris Graham | 4050 | =(B5 * 0.05) |
Owen Ingraham | 4750 | =(B6 * 0.05) |
Robert King | 5290 | =(B7 * 0.05) |
Greg Miller | 5640 | =(B8 * 0.05) |
Ian Ostrander | 3965 | =(B9 * 0.05) |
Howard Quinn | 5865 | =(B10 * 0.05) |
Tammy Steel | 3570 | =(B11 * 0.05) |
Debra Underwood | 3790 | =(B12 * 0.05) |
Mark White | 4500 | =(B13 * 0.05) |
Quincy Youngs | 4420 | =(B14 * 0.05) |
Totals: | =SUM(B2:B14) | =SUM(C2:C14) |