I have used a couple of libraries for generating reports in React. The easiest by a mile was react-csv which, with little to no configuration, can give you a CSV. But the library that I rely on these days is exceljs.