Link to home
Start Free TrialLog in
Avatar of kbit
kbit

asked on

Copy Excel data into HTML webpage

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
Avatar of Big Monty
Big Monty
Flag of United States of America image

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/
Avatar of kbit
kbit

ASKER

"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?
ASKER CERTIFIED SOLUTION
Avatar of Big Monty
Big Monty
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kbit

ASKER

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