ExportSpreadsheets is a class that can be used to create an Excel spreadsheet from data in a MySQL table. It performs a query to a given MySQL table and creates an Excel spreadsheet file using the PEAR Spreadsheet_Excel_Writer package. The class can export multiple worksheets to a single Excel file. Several parameters may be used to configure details like which table fields map to which spreadsheet columns, field sorting, etc.