Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 573965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:46:51+00:00 2026-05-13T13:46:51+00:00

Can I get some help interpreting / implementing the answers at: Copy/Paste from Excel

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T13:46:51+00:00Added an answer on May 13, 2026 at 1:46 pm

    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:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
        <script type="text/javascript">
        $(function() {
            $('textarea[name=excel_data]').keyup(function() {
                var data = $(this).val();
                var rows = data.split("\n");
                var table = $('<table />');    
                for(var y in rows) {
                    var cells = rows[y].split("\t");
                    var row = $('<tr />');
                    for(var x in cells) {
                        row.append('<td>'+cells[x]+'</td>');
                    }
                    table.append(row);
                }
                $('#excel_table').html(table);
            });
        });
        </script>
    </head>
    <body>
        <textarea name="excel_data" /></textarea>
        <div id="excel_table"></div>
    </body>
    </html>
    

    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_data field.

    Now, when you paste something in the excel_data field from excel, the resulting table should appear in the excel_table div.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 371k
  • Answers 371k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You could use the macros from <inttypes.h> to help out:… May 14, 2026 at 6:59 pm
  • Editorial Team
    Editorial Team added an answer static final String[] LANGUAGE = new String[] { "English","Urdu","French","Spanish" };… May 14, 2026 at 6:59 pm
  • Editorial Team
    Editorial Team added an answer A partition is a division of a storage device described… May 14, 2026 at 6:59 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.