Can I get some help interpreting / implementing the answers at:
Copy/Paste from Excel to a web page please?
This was the most useful answer Google found for “Paste Excel to Web Page/Form” — seems perfect but I can’t get to work.
(Requirement is to give users an option to pre-populate information in Excel, and when ready to submit a request paste into a form on our server.)
I “inherited” a server at work with
WAMP 2.0 Apache 2.2.11 PHP 5.2.9
I’m fair with VBA in Excel. Newbie at PHP. Tutorial and basic forms working okay, using Eclipse IDE.
Tried code in answers — d/l’d jquery and set the path in the code. Tutorial examples for jquery seem to work.
Tatu Ulmanen’s answer gives me a Parse error on "var data = $('input[name=excel_data]').val();"
Related to
// Insert into DOM ?
$('#excel_table').html(table);
Don’t know what that means.
Mic’s answer gives no error, but the convert button doesn’t do anything.
Ideas / direction? Please?
Given that you’re referring to my original answer, perhaps I can give you some insight on how it should work.
I had to make few changes to my original answer (textarea instead of input), but the full HTML required for that code to work is as follows:
That code will generate a HTML table of whatever excel data you paste into the textarea.
Note that this does not require any PHP to work as it is. If you want to save the data, you must create a form that submits the data to a PHP script which will do similar parsing on the data inside
excel_datafield.Now, when you paste something in the
excel_datafield from excel, the resulting table should appear in theexcel_tablediv.