Retrieves data from SQL database, perform some modification, then output Excel spreadsheet