I am working using php and mssql, and have a webpage that outputs contracts and how they are displayed is also controlled, so basically there are many ways in which to view the contracts.

The contracts are on display by building up a html table, so can I use that html table with all the data to export the data on show to a .csv file.