Samantha Adrichem
Samantha Adrichem

Reputation: 861

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?

Upvotes: 0

Views: 607

Answers (1)

Samantha Adrichem
Samantha Adrichem

Reputation: 861

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);

Upvotes: 1

Related Questions