0

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?

Samantha Adrichem
  • 833
  • 1
  • 12
  • 23

1 Answers1

1

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);
Samantha Adrichem
  • 833
  • 1
  • 12
  • 23
  • hi,how to get sheet by it's name..? – ngle Apr 27 '19 at 08:21
  • I'm no longer using alasql for it but without alasql: workbook.Sheets['sheetname'], using alasql just as in the link of my question: alasql.promise('select * from xlsx("cities.xlsx",{sheetid:"sheetname"})') – Samantha Adrichem May 10 '19 at 17:11