protobi / js-xlsx

XLSX / XLSM / XLSB (Excel 2007+ Spreadsheet) / ODS parser and writer
http://oss.sheetjs.com/js-xlsx
Other
814 stars 416 forks source link

Uncaught ReferenceError: aoa is not defined #111

Open hegoku opened 6 years ago

hegoku commented 6 years ago

I used to use SheetJS/js-xlsx, but it can't set cel style, so I find this lib. But when I switch SheetJS/js-xlsx/xlsx.full.min.js to this lib's xlsx.full.min.js, the browser shows the error :' Uncaught ReferenceError: aoa is not defined'.

var aoa=[
          ['a', 'b', 'c', 'd']
 ];
var ws = XLSX.utils.aoa_to_sheet(aoa);
idr17 commented 6 years ago

same issue with me too. how to fix this ?

pietersv commented 6 years ago

Did it say aoa or aoa_to_sheet not defined? The method aoa_to_sheet was added to the SheetJS community edition after this branch was created, so one approach would be to copy code from https://github.com/SheetJS/js-xlsx/blob/master/bits/90_utils.js.

Froschkoenig84 commented 5 years ago

But this fork doesn't support the... var ws = XLSX.utils.aoa_to_sheet(ws_data); so it's nice and easier to create an array-scheme like this... array-scheme

But okay, when it was added after this fork/branch. :/

If somebody finds time and wants to merge this feature in another branch. To combine almost both ...

Styles & aoa_to_sheet ()

...that would be great!