refactor and reshape format data for Excel download