I'm trying to make an excel export but for some reason it is not working at all, I'm using react-data-export and I was trying to do a small test using this as an Example but it didn't work at all.
This is my button:
<Button
startIcon = {<FileDownloadIcon />}
variant = "contained"
color = "success"
size = "medium"
onClick={exporExcel} >
Exportar Excel
</Button>
and this is my function:
const exporExcel = () => {
<ExcelFile>
<ExcelSheet data = {pedidos} name = "Prueba">
<ExcelColumn label="# Pedido" value="id"/>
<ExcelColumn label="Estudiante" value="nombre"/>
<ExcelColumn label="Colegio" value="escuela"/>
<ExcelColumn label="Grado" value="grado"/>
</ExcelSheet>
</ExcelFile>
};