tags:

views:

215

answers:

3

I am trying to get data from excel to jquery loop? Can someone help me on this?

+2  A: 
Michael
Yes, You are right. I want to add data from excel to a webpage using jquery.
Uday
+1  A: 

I think you'll need ActiveX. Search for "activex javascript excel". Here is an example

ActiveXObject Javascript

Also look into the Excel Object Model.

hab
+1  A: 

I can't think of any reliable and cross-browser method (not to mention easy to implement) to read an Excel file from client-side JavaScript, except (maybe) writing a Flash application to act as proxy between the binary file and the page's JavaScript environment.

It also looks like a kind of weird requirement, anyway. Is it possible that what the client is really asking for is a form to upload an Excel file and have it displayed in a web site plus some fancy jQuery animations on the resulting HTML?

If I had to do such task, I would do this:

  1. Write an HTML form with an <input type="file"> control.
  2. Write a server-side PHP application that: 2.1 Receives the file upload. 2.2 Open it as Excel file and extract data with a library like PHP-ExcelReader or PHPExcel. 2.3 Generate an HTML table with the aforementioned data.
  3. Code some fancy animations in jQuery.

Last but not least, I'm not an advanced Microsoft Office user but I believe Excel provides a "Save as Web Site" feature that allows to generate HTML linked to the source file. I've never used it and don't know if it'll suit your needs or not but it's there.

Álvaro G. Vicario