Hi, How can I load a value from a selected cell in excel (numbers), then have that data "type" out on a web form?
There are three separate date of birth fields (day/month/year) that are drop down mouse click boxes on a web page. If you have that field selected and you type the number fast enough, it will select that from the drop down instead of having to use the drop down button and scrolling..
I have the data in an excel sheet and the day, month and year are all in separate cells..
Ideally, the web page would be text fields that could be copy/pasted into.. but it's not.
So, I need to take the data from the cell in excel, then switch over to the webpage and have the macro type the numbers.. I was using the Sendtext command and if I just put in a number, that command works in that drop down field... So I know the program can do what I want it to do.. but how do I get the data from excel and have the macro look at it as numbers to be typed instead of just data from a copy function?
I hope I'm making sense, and thanks for your time!
Data from Excel to drop down modal
Moderators: Dorian (MJT support), JRL
- Dorian (MJT support)
- Automation Wizard
- Posts: 1386
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
I just replied to your ticket about this, so you should have just received an answer. I'll paste it here also, to help others. As you have already figured out the entering of the data to the webpage, this deals with getting the data from Excel in the first place.
------------
That's where functions such as XLGetCell come in.
The value in that cell would be in the variable strValue
http://www.mjtnet.com/manual/index.html?xlgetcell.htm
------------
That's where functions such as XLGetCell come in.
Code: Select all
XLOpen>%USERDOCUMENTS_DIR%\mybook.xls,1,xlBook
XLGetCell>xlBook,Sheet1,2,2,strValue
http://www.mjtnet.com/manual/index.html?xlgetcell.htm
Yes, we have a Custom Scripting Service. Message me or go here
I have the excel sheet open and am using copy and paste for the fields I can use that for..
Is there a way to get the macro to get the cell data from whatever cell I happen to have selected rather than specifying a specific cell in the code?
Another thought I had while searching through the forums is.. I put the data into excel just because it's easier to separate the data into different fields and arrow around for copy/paste.. but If I kept the data in a txt/csv file.. would that be any easier to deal with?
Is there a way to get the macro to get the cell data from whatever cell I happen to have selected rather than specifying a specific cell in the code?
Another thought I had while searching through the forums is.. I put the data into excel just because it's easier to separate the data into different fields and arrow around for copy/paste.. but If I kept the data in a txt/csv file.. would that be any easier to deal with?
- Dorian (MJT support)
- Automation Wizard
- Posts: 1386
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
My pleasure. Looping is equally as easy. The snippet below will read B1, B2, B3, ....... B10 simply by looping until row=10
Try this :
Try this :
Code: Select all
XLOpen>%USERDOCUMENTS_DIR%\mybook.xls,1,xlBook
let>row=0
repeat>row
let>row=row+1
XLGetCell>xlBook,Sheet1,%row%,2,strValue
messagemodal>strValue
Until>row,10
Yes, we have a Custom Scripting Service. Message me or go here