I have a input type=file and I'm trying to have js-xls load it.
<input ngf-select ng-model="mypage.myfile" type="file" id="file_input" name="myfile" >
Here are three different ways I've tried to load the file in my controller:
var workbook = XLS.readFile(mypage.myfile);
It says:
TypeError: Cannot read property 'readFileSync' of undefined
I also tried this:
var workbook = XLS.read(mypage.myfile, {type:"binary"});
And get:
TypeError: f.charCodeAt is not a function
And finally:
var workbook = XLS.read(mypage.myfile.toString(), {type:"binary"});
And get:
Error: Unsupported file 91
I verified each time that the mypage.myfile is actually there and what I expect.