Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel Module For NodeJS

I want to create .xls .xlsx file from NodeJS but i can't find any stable module for do that.

Is there any stable nodejs module for generating simple excel pages ?

like image 394
mTuran Avatar asked Nov 13 '22 17:11

mTuran


1 Answers

The Excel format is published by Microsoft as an open specification. You can get the spec here in a nicely formatted, intimidating 1200 page PDF.

I've used Microsoft spec documents before to figure out how to implement partial (incomplete) systems that just serve my specific use cases. In other words, if you can figure out the exact bits you need (i.e. just convert a 2d array into some excel rows), then you can often ignore rest of the spec as it doesn't apply to you.

I've also found that looking at solutions written in other languages has helped me - for example, here's a project that uses c#.

Depending on whats available on your backend system, you could spawn a child process that handles the conversion.

Or, you could offload the whole thing to a web service. Google Documents List API allows you to store and manipulate files Google Docs, and then with Google Spreadsheets API you can read and modify the data in Google Spreadsheets.

I realize none of this really addresses your question of the availability of a library, but might give you a new way of solving the problem.

like image 142
Andrew Avatar answered Nov 15 '22 06:11

Andrew