Mudsaf Posted February 1, 2013 Share Posted February 1, 2013 Hello, im trying to make javascript/jquery code that will read excel file so i can paste it to listbox and make some functions.It should be like this DEMO 7, but with excel data and not php http://kotowicz.net/jquery-option-tree/demo/demo.html Here is one example also but mine needs more functionality not just writing all data to javascript, because i have 5000 lines in my excel file. http://www.mol.fi/paikat/ Link to comment Share on other sites More sharing options...
jeffman Posted February 1, 2013 Share Posted February 1, 2013 If the file is in XML format, you should probably use AJAX. Then navigate the DOM document using DOM methods. Populate your document dynamically. My experience is that 5000 lines can be a little slow on older machines. Link to comment Share on other sites More sharing options...
Mudsaf Posted February 4, 2013 Author Share Posted February 4, 2013 Is it possible to read .csv or .xlsx file trough javascript/jQuery. My workplace wanted the 5000 lines so i guess the slow on older machines doesn't matter. Also they told that it should be done with javascript/jquery functions to get data. +NO PHP Example...Excel file data 0 | Item101 | Item1 Subcategory02 | Item1 Subcategory001 | Item1 Subcategory subcategory1 | Item210 | Item2 Subcategory And all Items in first category would go to first listbox and when clicking the item it would show the subcategories in second box. Link to comment Share on other sites More sharing options...
Mudsaf Posted February 4, 2013 Author Share Posted February 4, 2013 If the file is in XML format, you should probably use AJAX. Then navigate the DOM document using DOM methods. Populate your document dynamically. My experience is that 5000 lines can be a little slow on older machines.You were right the 5000 lines might be too much, thx for help anyways Link to comment Share on other sites More sharing options...
jeffman Posted February 4, 2013 Share Posted February 4, 2013 CSV will transmit just like text, and then JavaScript can break break it up very easily. Also, it's less bandwidth crazy than XML. But yeah, 5000 lines . . . Link to comment Share on other sites More sharing options...
Mudsaf Posted February 11, 2013 Author Share Posted February 11, 2013 Got this done by converting the excel file on json array's and works in no-time. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now