Sam
Sam

Reputation: 855

Nodejs Create excel (csv/xlsx) buffer file from json

I am looking for library which will create excel file ( csv and xlsx ) from from json

I have array of objects

var arr=[
    {
        "name": "Ivy Dickson",
        "date": "2013-05-27T11:04:15-07:00",
        "number": 10
    },
    {
        "date": "2014-02-07T22:09:58-08:00",
        "name": "Walker Lynch",
        "number": 2
    },
    {
        "number": 5,
        "date": "2013-06-16T05:29:13-07:00",
        "name": "Maxwell U. Holden"
    },
    {
        "name": "Courtney Short",
        "date": "2014-03-14T07:32:34-07:00",
        "number": 6
    }
]

and I want to convert it into excel file buffer.

I am not getting which library is best for my condition.

please suggest better library.

Upvotes: 1

Views: 4942

Answers (1)

Sombrero
Sombrero

Reputation: 376

You have that package json2xls, it's really easy to use, but it's only for convert json in excel file.

But you have a other package for convert json in csv, it's json2csv.

Upvotes: 2

Related Questions