One drawback to presenting data to a browser is that once you have it you can’t manipulate it. With more and more business functions being carried out through the web nowadays, the ability to export result sets into Excel so the business users can have their way with the data is essential. You can do this by setting the MIME type of the browser output, but this doesn’t always go as planned. Or you could create an instance of the Excel object on your server, but this could drain valuable resources on your server if you are serving a large audience, and produce a pretty large *.xls file as a result. Instead you can use the FileSystemObject to output data into a text file that is comma separated (CSV file), a method that demands less of your server, creating a significantly smaller file.
<%