Hi there, I have a really simple thing I'd like to do. I want to enter data from excel into something else. I want it to go each row and enter the value in the 2nd column.
Currently I have this:
//Specify the path of the Excel file here
Let>filename=C:\Documents and Settings\vanderwey\Desktop\two.xls
IfFileExists>filename
XLOpen>two.xls,1,xlH
//Ask how many rows we should get
Input>maxrows,How many rows shall I get?,200
If>maxrows=0
Exit>0
Endif
//Data starts on row 2 - row 1 has header
Let>row=1
Repeat>row
Let>row=row+1
//get the fields for this row
XLGetCell>xlH,Sheet1,row,2,field_2
//For this example we'll just paste each row into Notepad
SetFocus>Notepad*
Send>field_1
Press Enter
//you'll want to replace the above lines to send the data to your real app.
Wait>0.05
Until>row>maxrows
Else
MessageModal>Could not find: %filename%
Endif
But it is returning field_1
I want it to be whatever is in the cell.
Thanks in advance, I really appreciate it.
Simple Newbie Question #1
Moderators: Dorian (MJT support), JRL
Re: Simple Newbie Question #1
You need the full path to your file. In the XLOpen> line, replace "two.xls" with the variable "filename".
XLOpen>filename,1,xlH
XLOpen>filename,1,xlH