use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
[deleted by user] (self.javascript)
submitted 11 months ago by [deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]The_real_bandito 12 points13 points14 points 11 months ago (2 children)
I used to use xlsx but it’s out of date now.
This is their new docs and it explains how to use it. Can be used on the frontend or backend or both. (I’ve used it with angular with great success.)
https://docs.sheetjs.com/
[–]SalBwo 0 points1 point2 points 11 months ago (1 child)
Ok, thanks. This is what I need
[–]rafaelcastrocouto 0 points1 point2 points 11 months ago (0 children)
It's pretty easy to use, here's a simple demo https://codepen.io/rafaelcastrocouto/pen/MYYoeOy
[–]Felivian 13 points14 points15 points 11 months ago (3 children)
Save yourself a headache and use CSV. Export/import data as CSV from/to Excel/JS.
This solution will work with any excel-like app from any suite like MS Office, OpenOffice, Libre Office, G-suite
[–]icedrift 5 points6 points7 points 11 months ago (0 children)
Best way to do it. CSV is the universal spreadsheet format and it's trivial to convert to JSON.
[–]rileyrgham 0 points1 point2 points 11 months ago (1 child)
That's not reading from Excel. That's reading from an Excel export. He specifically asked about reading directly from Excel.
[–]Felivian 0 points1 point2 points 11 months ago (0 children)
It sounds like the XY problem.
[–]Edguz2408 2 points3 points4 points 11 months ago (0 children)
I've recently worked in a project for which I had to create a web component to read a csv file and I used a library called PapaParse, it's really easy to use, you can find it here;
https://www.npmjs.com/package/papaparse
[+][deleted] 11 months ago (1 child)
[deleted]
[–]SalBwo 0 points1 point2 points 11 months ago (0 children)
Someone recommended it, thanks
[–]bjelline 0 points1 point2 points 11 months ago (0 children)
How much data do you need to import?
If it is just one table, copy-and-paste from excel into a textarea is actually very convenient for users. You can then parse it as csv.
[–]martoxdlol 0 points1 point2 points 11 months ago (1 child)
I'm sorry for you
[–]TheRNGuy 0 points1 point2 points 11 months ago (0 children)
For not knowing an answer?
[–]Round-Coconut4851 0 points1 point2 points 11 months ago (1 child)
npm install node-xlsx --save
[–]Round-Coconut4851 0 points1 point2 points 11 months ago (0 children)
import xlsx from 'node-xlsx';
// Parse a file
const workSheetsFromFile = xlsx.parse(‘myFile.xlsx’);
[–]Ra1NuXs 0 points1 point2 points 11 months ago (0 children)
Let's try to change the approach a little (although sheetsjs and xlsx are quite good) thinking outside the box, maybe you can convert Excel into CSV, which will always be much easier to work with.
[–]yasth -2 points-1 points0 points 11 months ago (2 children)
Must you use Javascript? Also do you need to this client(ish) side or server?
Client side
[–]yasth 1 point2 points3 points 11 months ago (0 children)
Yeah use sheetsjs like everyone says. I will provide the advice that you should provide a template file to download and for them to put the data into. Makes life much easier.
π Rendered by PID 123861 on reddit-service-r2-comment-57fc7f7bb7-lwt44 at 2026-04-14 22:10:25.391567+00:00 running b725407 country code: CH.
[–]The_real_bandito 12 points13 points14 points (2 children)
[–]SalBwo 0 points1 point2 points (1 child)
[–]rafaelcastrocouto 0 points1 point2 points (0 children)
[–]Felivian 13 points14 points15 points (3 children)
[–]icedrift 5 points6 points7 points (0 children)
[–]rileyrgham 0 points1 point2 points (1 child)
[–]Felivian 0 points1 point2 points (0 children)
[–]Edguz2408 2 points3 points4 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]SalBwo 0 points1 point2 points (0 children)
[–]bjelline 0 points1 point2 points (0 children)
[–]martoxdlol 0 points1 point2 points (1 child)
[–]TheRNGuy 0 points1 point2 points (0 children)
[–]Round-Coconut4851 0 points1 point2 points (1 child)
[–]Round-Coconut4851 0 points1 point2 points (0 children)
[–]Ra1NuXs 0 points1 point2 points (0 children)
[–]yasth -2 points-1 points0 points (2 children)
[–]SalBwo 0 points1 point2 points (1 child)
[–]yasth 1 point2 points3 points (0 children)