By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,078 Members | 2,159 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,078 IT Pros & Developers. It's quick & easy.

Automated Form submission

P: n/a
World,
I work at a university where the professors have a system to input
grades for assignments and calculate final grades, which is output to
an excel file. they are then required to get on a different system and
click radio buttons in a form to input final grades. i would like to
automate this by doing some sort of automated form submission that
grabs the information from the excel sheet and selects the correct
radio button and then submits the form. does anyone have any idea on
how to get me started on this? is javascript even a possible solution?
would other languages do it better?

Brett

May 30 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
br*****@gmail.com wrote:
World,
I work at a university where the professors have a system to input
grades for assignments and calculate final grades, which is output to
an excel file. they are then required to get on a different system and
click radio buttons in a form to input final grades. i would like to
automate this by doing some sort of automated form submission that
grabs the information from the excel sheet and selects the correct
radio button and then submits the form. does anyone have any idea on
how to get me started on this? is javascript even a possible solution?
would other languages do it better?

Brett


Brett, you have not been clear about what resides where: is the system
to input grades for assignments a local program producing a local
output (the excel file), or is the excel file remote. If not, how is
the remote excel file obtained. What is the "different system" - does
it mean web page (I'm guessing yes since you mention radio buttons and
submitting a form), a local program, an excel program or what? - and
where do the web pages come in? And is the operating system windows,
linux, or something else?

So, here is my "shoot from the hip" response. Yes, I assume your task
can be automated, but I would go with (client side) PHP or VBScript or
something that supports automation (I assume a windows based system
since you mention Excel). Specifically, using either VBScript (which
has more documentation on this type of thing) or PHP, you can automate
excel to open and extract the information into your VBScript (or PHP)
program. Then you can bring up an instance of IE, have IE alter the
form, and then submit it.

I suggest researching the microsoft.public.scripting.vbscript usenet
group in pursuing your goal.

Good luck,
Csaba Gabor from Vienna

May 30 '06 #2

P: n/a

In article <11*********************@j55g2000cwa.googlegroups. com>,
br*****@gmail.com writes:
I work at a university where the professors have a system to input
grades for assignments and calculate final grades, which is output to
an excel file. they are then required to get on a different system
What kind of "system"?
and click radio buttons in a form to input final grades.
What kind of form? An HTML form in a web page? Do you maintain
this form? Is the form protected by any security features?
i would like to automate this by doing some sort of automated
form submission that grabs the information from the excel sheet
and selects the correct radio button and then submits the form.
Do you want this automated form filler to run a web server or be
a downloadable script or executable of some sort or what?
does anyone have any idea on how to get me started on this?
is javascript even a possible solution?


There are numerous possibilities depending on the answers above.

For example, you might write a script (in whatever language you
prefer) that runs on the client and uses the COM interface to
Internet Explorer to fill out a form on a web page. You might
write a server-side application that uploads the excel sheet and
sends direct HTTP POSTs to a web page. Perhaps you might use
Javascript with XMLHTTPRequest, but since I've never tried that,
I don't know for sure.

--

Warren S. Sarle SAS Institute Inc. The opinions expressed here
sa****@unx.sas.com SAS Campus Drive are mine and not necessarily
(919) 677-8000 Cary, NC 27513, USA those of SAS Institute.
May 30 '06 #3

P: n/a
to clarify, the system that generates the excel file is on one server
that is out of my control. it is a web based system where the
professors can export their grades to the excel file. assume you can't
do anything to that system.
secondly, the system to input grades is on a separate web server, run
by a different group, who also refuses to add the functionality of
adding grades via excel file. assume you can't change anything there.
it is a web form with radio buttons, etc.
i need a client or script that pulls the data from the excel file and
fills out the web form intelligently.
having said that, would javascript be a viable solution? i think a
client side language is going to work better here. also, i need
something that will work with the forms fairly well and easily.
having said that, any more advice??

Brett Evanson

Warren Sarle wrote:
In article <11*********************@j55g2000cwa.googlegroups. com>,
br*****@gmail.com writes:
I work at a university where the professors have a system to input
grades for assignments and calculate final grades, which is output to
an excel file. they are then required to get on a different system


What kind of "system"?
and click radio buttons in a form to input final grades.


What kind of form? An HTML form in a web page? Do you maintain
this form? Is the form protected by any security features?
i would like to automate this by doing some sort of automated
form submission that grabs the information from the excel sheet
and selects the correct radio button and then submits the form.


Do you want this automated form filler to run a web server or be
a downloadable script or executable of some sort or what?
does anyone have any idea on how to get me started on this?
is javascript even a possible solution?


There are numerous possibilities depending on the answers above.

For example, you might write a script (in whatever language you
prefer) that runs on the client and uses the COM interface to
Internet Explorer to fill out a form on a web page. You might
write a server-side application that uploads the excel sheet and
sends direct HTTP POSTs to a web page. Perhaps you might use
Javascript with XMLHTTPRequest, but since I've never tried that,
I don't know for sure.

--

Warren S. Sarle SAS Institute Inc. The opinions expressed here
sa****@unx.sas.com SAS Campus Drive are mine and not necessarily
(919) 677-8000 Cary, NC 27513, USA those of SAS Institute.


Jun 5 '06 #4

P: n/a
br*****@gmail.com wrote:
I work at a university where the professors have a system to input
grades for assignments and calculate final grades, which is output to
an excel file. they are then required to get on a different system and
click radio buttons in a form to input final grades. i would like to
automate this by doing some sort of automated form submission that
grabs the information from the excel sheet and selects the correct
radio button and then submits the form. does anyone have any idea on
how to get me started on this? is javascript even a possible solution?
would other languages do it better?


Perl could do all this for you:
- read the Excel file
- tie Excel's fields to variables
- fire off http request using GET or POST with the variables as values
of the form names

Hope this helps,

--
Bart

Jun 5 '06 #5

P: n/a
Any suggestions as to some classes or functions that would be extremely
useful? i haven't coded in perl much.
Bart Van der Donck wrote:
br*****@gmail.com wrote:
I work at a university where the professors have a system to input
grades for assignments and calculate final grades, which is output to
an excel file. they are then required to get on a different system and
click radio buttons in a form to input final grades. i would like to
automate this by doing some sort of automated form submission that
grabs the information from the excel sheet and selects the correct
radio button and then submits the form. does anyone have any idea on
how to get me started on this? is javascript even a possible solution?
would other languages do it better?


Perl could do all this for you:
- read the Excel file
- tie Excel's fields to variables
- fire off http request using GET or POST with the variables as values
of the form names

Hope this helps,

--
Bart


Jun 5 '06 #6

P: n/a
brettev wrote:
Any suggestions as to some classes or functions that would be extremely
useful? i haven't coded in perl much.


Then you will probably have a hard time.

The Excel part:
http://search.cpan.org/dist/Spreadsh.../ParseExcel.pm

The HTTP part:
http://cpan.uwinnipeg.ca/htdocs/libw...UserAgent.html

This has nothing to do with javascript though, please move to
comp.lang.perl.misc for Perl related discussions.

--
Bart

Jun 5 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.