Write data to excel file