You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 14, 2017. It is now read-only.
I am using this package in my application to read excel files and import the data. On the server side, I have a method that gets the range of the sheet in preparation for reading. When I call 1 of the helper functions under utils (decode_range), I get a Internal 500 error on the client and a method not found error on the server. Am I missing anything here?
//Gets base path of application
var fs = Npm.require('fs');
var path = Npm.require('path');
var basepath = path.resolve('.').split('.meteor')[0];
//Create excel object
var excel = new Excel('xlsx');
//Read excel file
var workbook = excel.readFile( basepath+'public/test.xlsx');
var sheet = workbook.Sheets['Sheet1'];
//Gets range from sheet and run decode_range
var encodedRange = sheet['!ref'];
return excel.utils.decode_range(encodedRange);
The text was updated successfully, but these errors were encountered:
I am using below code for same but i am getting error like Exception while invoking method 'filehere' undefined
Meteor.methods({
'filehere' : function (messageData) {
var fs = Npm.require('fs');
var path = Npm.require('path');
var basepath = path.resolve('.').split('.meteor')[0];
var basepath = basepath+'server/MeteorJs.xls';
console.log(basepath);
var excel = new Excel('xls');
var workbook = excel.readFile(basepath);
//var yourSheetName = workbook.SheetNames;
},
});
can youy fix this problem???
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
I am using this package in my application to read excel files and import the data. On the server side, I have a method that gets the range of the sheet in preparation for reading. When I call 1 of the helper functions under utils (decode_range), I get a Internal 500 error on the client and a method not found error on the server. Am I missing anything here?
//Gets base path of application
var fs = Npm.require('fs');
var path = Npm.require('path');
var basepath = path.resolve('.').split('.meteor')[0];
//Create excel object
var excel = new Excel('xlsx');
//Read excel file
var workbook = excel.readFile( basepath+'public/test.xlsx');
var sheet = workbook.Sheets['Sheet1'];
//Gets range from sheet and run decode_range
var encodedRange = sheet['!ref'];
return excel.utils.decode_range(encodedRange);
The text was updated successfully, but these errors were encountered: