Hi all,
I would like to get a sample perl code to fill up the html input field by making use of
a .xls file.
The flow is like this..
I have page containing a "Go" button. Click on the "Go" button will call a perl program,
that should read a .xls file record (first record) and fill up these data input fields of an html file.
How can i do that? It will be helpful for me if anyone can provide sample code.
--------------------------
First html:- test.html
<HTML><HEAD><TITLE> Test </TITLE></HEAD>
<BODY>
<form method="post" name="test" action="/cgi-bin/readxls.pl">
<input type="Submit" name="Go" value="Go">
</form>
</BODY></HTML>
abc.xls file
abc.xls file contain 3 fields say name, age and sex
abc.xls file contain data as follows:
Xavier 25 M
Mary 22 F
Result from .xls file will fillup in the following html file.
result.html
-----------
<HTML><HEAD><TITLE> Test </TITLE></HEAD>
<BODY>
Name: <input type="text" name="name" ><br>
Age: <input type="text" name="age" ><br>
Name: <input type="text" name="sex" ><br>
</BODY></HTML>
Call test.html file and click on the "Go" button will call a perl program
that will read first record (say Xavier, 25, M) from the abc.xls file and
fillup the appropriate fields in the result.html and display in the browser.
Hope i my questions is clear to all. I am waiting for the great help from the
perl experts.
Thanks
Best Regards,
Dan
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.