Unable to export data to excel