Jump to content

Recommended Posts

Posted

How to read data of an Excel worksheet?

In the example below am reading data of a txt file

Run("CadCli.exe")

$file = FileOpen("c:\Familia.txt", 0)

While 1

$Whole_Line = FileReadLine($File)

$Columns = StringSplit($Whole_Line, "|")

$First_Column = $Columns[1]

$Second_Column = $Columns[2]

If @error = -1 Then ExitLoop

WinWaitActive("Cadastro de Clientes")

ControlClick("Cadastro de Clientes", "", "[CLASS:TEdit;INSTANCE:2]")

Send($First_Column)

ControlClick("Cadastro de Clientes", "", "[CLASS:TEdit;INSTANCE:1]")

Send($Second_Column)

ControlClick("Cadastro de Clientes", "", "[CLASS:TButton; TEXT:Gravar; INSTANCE:2]")

Send("{ENTER}")

Wend

FileClose($Whole_Line)

MsgBox(0, "Teste", "Todos os arquivos foram gravados com sucesso")

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...