Convert Excel to JSON with Angularjs

I am trying to download a custom excel file from my computer and then convert it to JSON. I need these files as JSON. I have it so that they can load csv into JSON. Now I want to succeed in JSON. Any recommendations or recommendations on this will be appreciated. This needs to be done using angularJS. Thanks!

+7
json angularjs excel csv
source share
2 answers

Forget file manipulation using AngulaJS. Angular is a JS front-end infrastructure without file management support. You need to have access to the server where the file is stored, and you will only get it on the server side.

EDIT:

Ok, I found out that you can use the FileReader API or $ parse Angular to read the contents of the file on the interface, which is really cool.

Option A: Read this fooobar.com/questions/277710 / ... and follow plnkr to see an example of the FileReader API used with Angular. Claims to @MajoB for excellent answers and code examples.

Option B: Check out the official Angular documentation to familiarize yourself with the $parse service and check this fiddle to see it in action.

Unfortunately, neither the FileReader API nor the $ parse service can read Excel files. They can read .txt , .csv , .json and even .html , but not .xlsx

+2
source share

Code example:

 http://jsfiddle.net/d2atnbrt/3/ 

External library:

 https://github.com/SheetJS/js-xls 
+1
source share

All Articles