Displaying FrontPage Database Results as an Excel SpreadsheetIntroductionThe FrontPage 2000 Database Results Wizard (DRW) allows you to query information in a database and display it as an HTML table. You can also display the information as an Excel spreadsheet within the user's browser (if the user is running Internet Explorer and has MS Excel installed on their machine). The user can analyze the DRW results with Excel and save the results as an Excel spreadsheet. TechniqueDisplaying DRW results as an Excel spreadsheet requires that the content type of the ASP page be set to "application/vnd.ms-excel" and ONLY the table html be sent to the browser, ie, no <html> tags, etc. (This may also require IIS5 since it automatically strips the DRW code from the output, leaving only the table html.) You use the Response Object to set the content type and assure that only the <table> is sent to the browser. This is done by adding 4 inline ASP scripts to the DRW page that;
ImplementationHere's how to implement this technique;
© Copyright 2002 Stephen C. Travis, all rights reserved. Republished with the permission of the author. Back to Stephen Travis' Thingumajig |