Trying to create a function to export the data in .xlsx