xlsxalasql

Alasql - How to get the sheet names from an xlsx file?


According to: https://github.com/agershun/alasql/wiki/XLSX you can send in the sheetid to read out a different sheet.

I can't however find any way to read out the available sheets.

Does anyone know how this should be done?


Solution

  • Instead of using alasql, first read your workbook yourself using the xlsx plugin

    // file is instanceof File object
    let workbook = XLSX.read(URL.createObjectURL(file));
    console.log(workbook.SheetNames);