Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Javascript 

NPM package for Excel downloads

I've programmed an application in Node, Mongo, Express etc, and I need to allow users to download an excel report from it. I found a neat NPM package called node-excel-export which seemed to be exactly what I wanted, I installed it and wrote my function, but......

Now I've realised that I don't think it's quite right for what I'm doing. Although it lets you set the styles and all that, in seems quite limited in how it lets you manipulate data. I have 3 or 4 'datasets' that I need to include on the report, and this package only seems to allow one (an array of objects).

I could just smoosh all the data together 'laterally', but I really don't want to do that, because it would look weird.

There seem to be a few different options kicking around for npm packages, or for doing it with client side JS. I was hoping that somebody on here might have some experience with doing this and some advice to offer, rather than me spending the next week experimenting - does anyone know of a package that might do what I need, allow me to create an excel download where I have a reasonable level of control of the layout of the sheet?

Thanks.
Most use cases can be covered by just exporting data in CSV format and reading that into Excel/Google Sheets. If you want to customize actual Excel worksheets with styling, formatting, etcetera then you can use https://www.npmjs.com/package/exceljs

This tutorial is easy to follow: https://spin.atomicobject.com/2018/11/28...eneration/


Possibly Related Threads...
Thread / Author Replies Views Last Post
by HackersMar 4, 2024 09:05 AM 19 461 Mar 4, 2024 09:05 AM
Last Post: Hackers
[Javascript]  by bevcSep 5, 2019 08:42 AM 5 277 Sep 5, 2019 08:42 AM
Last Post: Anzee
[Javascript]  by FreskuAug 27, 2017 12:28 AM 0 106 Aug 27, 2017 12:28 AM
Last Post: Fresku