Skip to content
Advertisement

Reading excel file in Reactjs

I am trying and banging my head already while trying to read excel file in Reactjs.

I have tried multiple libraries out there like, Sheetjs , excel-parser, exceljs and so on (like 8-9) libraries.

I am getting weird and different errors in every library.

For example i am using excel-parser and getting following error

JavaScript

That is because it is a node module and won’t work in browser.

Anyone know some good and easy library that can work with reactjs in browser?

Advertisement

Answer

I have successfully read excel file using Sheetjs‘s npm version xlsx.

Here is code:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement