Angular..SpreadhSheet..ExportData from the grille to Excel FIle

Discussão em 'Angular' iniciado por adem mrid, Novembro 12, 2024.

  1. adem mrid

    adem mrid Guest

    im working with x-data-spreadsheet and i want to export all my data in the grille into a file excel. i used this.spreadsheet.getData() to get all the data than try to export it but nothin..any help plz.
    output are array of objects.

    exportDataToExcel(): void {

    const data = this.spreadsheet.getData();
    console.log("Data : ",data);
    console.log("TYPE : ",typeof data);
    const ws: XLSX.WorkSheet = XLSX.utils.aoa_to_sheet(data)
    const wb: XLSX.WorkBook = XLSX.utils.book_new();
    XLSX.utils.book_append_sheet(wb, ws, 'Sheet1');
    const fileName = 'spreadsheet_data.xlsx';
    XLSX.writeFile(wb, fileName);


    i expecting to export all my data in the grille to a excel file

    Continue reading...

Compartilhe esta Página