Fixed bug in excel file creation