Solved

Create form that accepts "pasting" from excel

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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 …
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

706 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

21 Experts available now in Live!

Get 1:1 Help Now