Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.

Join them; it only takes a minute:

Sign up
Join the Stack Overflow community to:
  1. Ask programming questions
  2. Answer and help your peers
  3. Get recognized for your expertise

Im working on a project using Meteor in which i need to do some data parsing from given xlsx file into json. Actually i want some thing like that i upload a xlsx file it gives me data back in the form of json.

Since, Meteor is a nodejs framework so i tried every nodejs npm packages like xlsx,node-xlsx,excel,excel-parser etc etc but Meteor doesn't support the packages' files and gives errors.

So, anybody there who has any hack for this or any solution for parsing xlsx file into json without any issues using Meteor.

share|improve this question
    
There are packages line github.com/stubailo/meteor-xlsx that do the legwork for you – SheetJS Feb 5 '15 at 19:17

You need to load the package correctly. If you just install the package in project directory like in a plain Node.js project, Meteor will pick it up as source code and try to compile it in its way, which will lead to errors.

The correct way is to use npm package.

1) Install it with mrt:

mrt add npm

2) Create packages.json with list of Node packages you want to use:

{
  "xlsx": "0.6.1"
}

3) Load the package with Meteor.require:

var xlsx = Meteor.require('xlsx');
share|improve this answer

You have made a small application which reads an excel file in Meteor.

You can find it here meteor-import-excel-example

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.