?
Solved

Copy Excel data into HTML webpage

Posted on 2014-01-20
4
Medium Priority
?
2,129 Views
Last Modified: 2014-01-20
Hi,

I have a simple HTML form like this, laid out with 3 lines of 3 input fields:

<form name="test">
<input type="text"><input type="text"><input type="text"><br>
<input type="text"><input type="text"><input type="text"><br>
<input type="text"><input type="text"><input type="text"><br>
</form>

Open in new window

I have an Excel file, 3 rows by 3 columns, with data like this (without the dots):

1.....4.....7
2.....5.....8
3.....6.....9


If I select those 9 cells in Excel, copy them and then select an input field on my HTML form and then paste, the contents of the 9 Excel cells all go into the 1 input field.

Is there any way to have those 9 cells pasted into my 9 HTML input fields (without having to do them one by one) and if so, can someone please provide a script to do it?

Many thanks
0
Comment
Question by:kbit
  • 2
  • 2
4 Comments
 
LVL 34

Expert Comment

by:Big Monty
ID: 39794867
you would need to either paste the contents of the excel file into one field and then parse it out, or you would need to open the excel file server side and parse it out.

what are you ultimately trying to do? If you want to be able to edit the excel spreadsheet, have a look at this jquery plugin:

http://handsontable.com/
0
 

Author Comment

by:kbit
ID: 39794963
"you would need to either paste the contents of the excel file into one field and then parse it out,"

This sounds like a possibility, maybe submit the contents and somehow split it all out using PHP?
0
 
LVL 34

Accepted Solution

by:
Big Monty earned 2000 total points
ID: 39794980
here's a tutorial that does just that:

http://www.ibm.com/developerworks/opensource/library/os-phpexcel/index.html

it requires a database to save the results in, not sure if that's part of your requirements...
0
 

Author Comment

by:kbit
ID: 39795120
Yes this method will work perfectly, thank you for your help
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses
Course of the Month13 days, 14 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question