forked from sheetjs/sheetjs
SheetJS
471275b761
- new ExtendScript demo - Base64 shim improvements h/t @davidchambers @sheetjsdev - jszip improvements to support extendscript
3 lines
535 B
JavaScript
3 lines
535 B
JavaScript
#target estoolkit
|
||
var thisFile = new File($.fileName);
|
||
var basePath = thisFile.path;
|
||
|
||
#include "shim.js";
|
||
#include "jszip.js";
|
||
#include "xlsx.flow.js";
|
||
|
||
var filename = "/sheetjs.xlsx";
|
||
var infile = File(basePath+filename);
|
||
infile.open("r");
|
||
infile.encoding = "binary";
|
||
var data = infile.read();
|
||
var workbook = XLSX.read(data, {type:"binary"});
|
||
var first_sheet_name = workbook.SheetNames[0];
|
||
var first_worksheet = workbook.Sheets[first_sheet_name];
|
||
var data = XLSX.utils.sheet_to_json(first_worksheet, {header:1});
|
||
alert(data);
|