Solved

Copy Excel data into HTML webpage

Posted on 2014-01-20
4
1,303 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 32

Expert Comment

by:Big Monty
Comment Utility
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
Comment Utility
"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 32

Accepted Solution

by:
Big Monty earned 500 total points
Comment Utility
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
Comment Utility
Yes this method will work perfectly, thank you for your help
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
This article discusses how to create an extensible mechanism for linked drop downs.
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…

771 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now