Solved

Create form that accepts "pasting" from excel

Posted on 2006-10-20
5
152 Views
Last Modified: 2011-08-18
Hey everybody, I don't know if this is posted in the right area, but I'm going to give it a shot.  I am trying to build a web page that can accept data from the user.  This is done very easily by creating a form with a bunch of input boxes ("<input type=text>").  My problem is, the page is going to be used by high-level executives, and I know it sounds bad, but they won't want to re-type all of their numbers.  The numbers that they enter will already exist in an Excel workbook that they regularly use, so I want to make is so that the users can simply select 31 cells in their Excel workbook, hit "Copy", and then go to the web page and select "Paste", and then magically, all of the data will appear in the form on the web page.

I know I have seen this done with 3rd party applications, but I'm wondering if this can be done with a simple HTML page.  I don't mind if some scripting has to be done...  maybe the user could paste into the first input box and then a script would read the entire string that was pasted and split around a tab, then fill in each box separately, I don't know.

Any thoughts or prior experience would be GREATLY appreciated.  Thanks!

-Scott
0
Comment
Question by:scbauer
  • 2
5 Comments
 
LVL 16

Expert Comment

by:ThinkPaper
ID: 17776541
you could consider using a WYSIWYG html text editor like richtext or fckeditor as a replacement to your standard "textarea" or "text" field. it should be able to accept the copies from Excel and turn them into a table, but this isn't a pretty solution as you won't be able to exactly "grab" the cell values without doing some filtering.
0
 

Author Comment

by:scbauer
ID: 17782586
Okay, well I've come up with a solution, but I'm still curious if people can come up with something better.  I simply wrote some VBScript code.  The user can paste either vertical or horizontal copied cells from excel into a textarea.  When the user clicks a button, the code simply splits the text of the textarea around one of 4 or 5 possible values (Cr, Lf, Tab, etc...).  With the text broken out into an array, I then loop through the array and place the text into a bunch of input boxes.  The user can verify that the numbers are correct and then submit the form.

If anybody can come up with something that actually looks like an excel workbook that can be pasted into, I would prefer that method.  The points are still available.

-Scott
0
 

Author Comment

by:scbauer
ID: 17782587
By the way, ThinkPaper, thanks for the idea.  I agree that this wouldn't be "pretty" and I'm trying to present this web page to some high-level executives.  As much as I hate to say it, this must look pretty and work well.

-Scott
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 18256570
PAQed with points refunded (125)

Computer101
EE Admin
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

895 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

17 Experts available now in Live!

Get 1:1 Help Now