This is how we do it...put this button under the table in your document.
<input style="FONT-FAMILY: arial; FONT-SIZE: 8pt" value="Export to Excel" type="button" class="inputControl" onclick="exportIntoExcel>
Function exportIntoExcel()
Dim j
Dim myRange
on error resume next
Set ExcelApp = CreateObject("Excel.Application"

If Err Then
window.alert "Error starting Excel. Make sure you have Excel installed and that your browser's security setting for 'Initialize and script ActiveX controls not marked as safe' is not disabled."
Exit Function
End If
ON Error Goto 0
ExcelApp.Visible = true
Set ExcelWB = ExcelApp.Workbooks.Add
set s = ExcelWB.ActiveSheet
if not document.all("topTable"

is nothing then
addTableToSheet(document.all.topTable)
end if
if not document.all("reportTable"

is nothing then
addTableToSheet(document.all.reportTable)
end if
Set s= nothing
Set myRange = nothing
Set ExcelWB = Nothing
Set ExcelApp = Nothing
maxColCount = 0
maxRowCount = 0
self.focus
window.alert "Excel spreadsheet created."
End Function
'global
Dim ExcelApp
Dim ExcelWB
Dim s
Dim maxColCount : maxColCount = 0
Dim maxRowCount : maxRowCount = 0
Function addTableToSheet(thisTable)
Dim z
Dim i
Dim j
for i=0 to thisTable.rows.length - 1
for j=0 to thisTable.rows(i).cells.length-1
z = thisTable.rows.item(i).cells.item(j).innerText
s.Cells(i+1+maxRowCount,j+1) = z
s.Cells(i+1+maxRowCount,j+1).font.size = 10
if j+1 > maxColCount then
maxColCount = j+1
end if
next
next
'make a blank line
maxRowCount = maxRowCount + thisTable.rows.length + 1
End Function