I have a web page with HTML Table with roster information. I want to have a link at the bottom of the html page that will take the data from the table and export to Excel.
@FCBSep 16.2004 — #i would make the excel sheet yourself and make it available for download, otherwise, tell them to get IE and use the export feature on the right click, lol!
@baconbuttySep 16.2004 — #In Internet Explorer it is possible to do this by automation.
Google on "automation of Excel" or something.
Excel comes with an ActiveXObject, that lets you automate it from script.
I.e.
var oExcelObject=new ActiveXObject("Excel.Sheet");
From this you can access all of the macro functions provided by Excel, e.g. you could iterate through your HTML table and pass the values directly to the Excel cells.
To learn more about Excel automation, and the ActiveXObjects available, look at the Excel Visual Basic helpfiles that come with Excel. Given that Excel has VB as a macro language, their documentation and examples are in VB, but it is fairly easy to translate into javascript.
I will have a look for an old script I have on this.