2

I want to use javascript and jquery to read data from a spreadsheet that looks like this:

ID# , Name , Date     ,  Website
1   , Bob  , 2/2/2012 , www.bob.com
2   , Mark , 1/1/1990 , www.Mark.com

And then generate a markup like below:

<body>
<img src="https">
<ul>
    <li>Name</li>
    <li>Date</li>
<ul>
</body>

where "https", "Name", and "Date" are gonna be replaced by the info from the spreadsheet.

I'm thinking to use the ID Number to choose which row I want to generate the code so there might be something like this:

<input type="text" value="">
<button type="button">Generate</button>

My question is what's the easiest way to do it without having to use ActiveX ?

Note: If there is any more information I can provide you with to aid with this question, please ask freely.

Thank you.

leonhart
  • 1,193
  • 6
  • 12
  • 1
    are you trying to get this data from a .csv file or an actual .xls or .xlsx spreadsheet – Taylor Brown Jun 06 '13 at 21:50
  • if you are only supporting HTML5 compliant browsers that support the File Api you might check this out. http://www.html5rocks.com/en/tutorials/file/dndfiles/ if you have to support non compliant this might help: http://www.html5rocks.com/en/tutorials/file/dndfiles/ (i've also seen flash options for reading files locally with js) – scrappedcola Jun 06 '13 at 21:54
  • if you are attempting to read from an excel spreadsheet then this post may be helpful: http://stackoverflow.com/questions/5494387/read-excel-data-with-jquery – Taylor Brown Jun 06 '13 at 22:02
  • Sorry for late reply, I'm looking to do this with .csv file in my local server. – user2340266 Jun 07 '13 at 15:10

1 Answers1

0

Which part are you having trouble with, reading the data, generating, or the query? The first two parts seem to be pretty well covered here in this question Import a CSV file using jQuery.

Community
  • 1
  • 1
sareed
  • 665
  • 9
  • 19