PDA

View Full Version : Want to Load Excel file to grid



Hardik013
10 May 2015, 8:41 PM
Hii..

I have an Excel file and i want those data on excel file in my grid of Front page of ExtJs 5.0. In short i want to load data to grid. So , What do i do to import an Excel file to grid.....

mitchellsimoens
12 May 2015, 9:17 AM
You need to parse the xlsx (or whatever) file into a format that is readable in JavaScript. You need an array of objects.

Hardik013
12 May 2015, 9:49 AM
Can i Do this on client side only , i mean as soon as i import an excel file and all data of that file will reflect on grid... ??(in ExtJs 5.0)

mitchellsimoens
12 May 2015, 9:51 AM
Ext JS does not have this functionality.

jvandemerwe
3 Jun 2015, 4:32 AM
I have a couple of functions for my customers where they can upload Excel documents and use the data in an Ext JS grid.

I am using the Simplexlsx PHP class: https://github.com/raulferras/simplexlsx.

So I use an Ext upload field to upload the XLS to the server and process the Excel rows with the earlier mentioned class into an array and process it. The result of that process could be having a JSON as response that could be used to send back to an Ext JS store.

This Simplexlsx class is very easy to use.