Solved

Create form that accepts "pasting" from excel

Posted on 2006-10-20
5
154 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

776 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