Copy Excel data into HTML webpage

Posted on 2014-01-20
Last Modified: 2014-01-20

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>

Open in new window

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


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
Question by:kbit
  • 2
  • 2
LVL 33

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:

Author Comment

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?
LVL 33

Accepted Solution

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

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

Author Comment

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

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
alert(innerHTML); 8 32
suddenly angular cli doesn't work. 5 38
How to make a good PHP + MySQL + JS pagination system? 3 31
Autocomplete with Jquery Question 2 19
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to dynamically set the form action using jQuery.
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)

789 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