Added code to output to an excel worksheet.