-1

I want to transfer my text data (From Excel) into a form and submit it. It takes lot of time to perform this operation. So I'm looking into automation tool which can do this task for me.

Basically this webpage consists of Text fields and button.

Is there any way to fill the text field and click on button, by using the Tag name of text field and button from excel?

Brad Koch
  • 16,415
  • 18
  • 102
  • 128
  • please add proper information and if possible then jsfiddle also. otherwise you have only one option for access data from excel to your form is ctrl+c and ctrl+v – Anup Oct 10 '13 at 13:42
  • Thanks for remanding about ctrl+c and ctrl+v. I asked is there any means other then entering the data manually into webpage. – user2351447 Oct 10 '13 at 14:05

2 Answers2

0

Is this for yourself or for deployment to the web?

If it's for yourself, you could save the excel file as a CSV. You should then be able to find a way to process it into something that JS can understand.

Actually setting the value of a text element is simply done by targeting the element and setting its value=someValue. For example, you could do

var t = document.getElementById("firstTextField")
t.value = "someValue"

You could also use jQuery for that sort of thing.

LiavK
  • 610
  • 5
  • 20
0

You don't really need to use the browser at all. The browser and Excel are just UI on top of the underlying data and API definition, you can script this out. The general idea:

  1. Inspect the form you're trying to submit. Find the target, the submit method, and the field names.
  2. Export the excel file to a CSV.
  3. Write a simple script to loop through each record and make an http request that corresponds with the form submission - same HTTP method, same target URL, putting the Excel values in under the appropriate input names.

It's hard to be more specific with the information you've provided.

Brad Koch
  • 16,415
  • 18
  • 102
  • 128