WinBatch Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: MW4 on March 13, 2019, 12:38:13 pm

Title: webpage input from excel
Post by: MW4 on March 13, 2019, 12:38:13 pm
I'm trying to set up a script that will take data from an excel sheet in columns and insert it into a form on a web page.

I have inspected the web page field and it shows this:
<input id="regForm:dateSold" name="regForm:dateSold" type="text" value="03/13/2019" maxlength="11" size="11" class="date">
(it is defaulting to today's date)
<input id="regForm:vin" name="regForm:vin" type="text" value="" class="vin" title="Vehicle Identification Number">

I want to set the Value= to the date and VIN from columns in an excel sheet.

Can anyone point me in the right direction to get started?

Title: Re: webpage input from excel
Post by: td on March 13, 2019, 02:08:42 pm
If you have no experience working with Webpages in WinBatch, I suppose the best place to start would be the tutorial in the Tech Database:

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+Tutorials+Working~With~Web~Pages.txt (http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+Tutorials+Working~With~Web~Pages.txt)

There is also this:

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WIL~Extenders/WinInet+HTTP~and~WinInet~-~An~Opus.txt (http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WIL~Extenders/WinInet+HTTP~and~WinInet~-~An~Opus.txt)

and this:

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/OLE~COM~ADO~CDO~ADSI~LDAP/OLE~with~MSIE+See~What~Buttons~Pushed~in~MSIE.txt (http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/OLE~COM~ADO~CDO~ADSI~LDAP/OLE~with~MSIE+See~What~Buttons~Pushed~in~MSIE.txt)

There are many other examples in the Tech Database and on this forum.  Of course, there are always things that will trip up your best-laid plans and require some form of a workaround.  But that is to be expected when working with Webpages.

The Excel part is covered extensively in the Tech Database, as well.
Title: Re: webpage input from excel
Post by: td on March 13, 2019, 03:20:24 pm
Notice that you asked a very similar question back in 2014 so that thread might be another place to check out.

http://forum.winbatch.com/index.php?topic=1030.msg4728#msg4728 (http://forum.winbatch.com/index.php?topic=1030.msg4728#msg4728)
Title: Re: webpage input from excel
Post by: MW4 on March 13, 2019, 08:31:31 pm
Thanks, that will get me started!!
Title: Re: webpage input from excel
Post by: stanl on March 14, 2019, 03:00:08 am
I used to perform thousands of lookups into Edmunds.com for depreciation stats. Rather than keeping both Excel and a browser open I would first process the Excel data to a text file or list and use that as the basis for webscrapes. I may still have the script in an archive and parts of it may be of use.  You can send me a private message if interested.