Jump to content

Recommended Posts

Posted

I am working with a spreadsheet (libreoffice) Windows 11 (or windows 10). When i am filling out data to cells (read from a file) using a loop, the script runs correctly for the first 5 entries then fails to move right 1 cell, moves to next line as expected, then fails to move right 1 cell and enters the rest of the data correctly. 

INI FIle

[Bills]
Aqua Il=100
Com Ed=100
Farm & Fleet=0
Frontier=191.90
Meijers=0
Nicor=60
Sears=0
State Farm=103.73
Verizon=171.84

Code Snippit

Func Data2($v1, $v2)
    Send($v1 & "{RIGHT}" & $v2 & "{RIGHT}{Down}{Left 2}")
    Sleep($iTimeOut)
EndFunc

Func Create_Bills()
    Local $ary
    $ary = IniReadSection($INI_FILE, "SAVINGS")
    For $i = 1 to $ary[0][0] Step 2
        Data3($ary[$i][1], $ary[$i+1][0], $ary[$i+1][1])
    Next    
    Send("{RIGHT}")
    $ary = IniReadSection($INI_FILE, "Bills")
    For $i = 1 to $ary[0][0]
        Data2($ary[$i][0], $ary[$i][1])
    Next

EndFunc

Spreadsheet outpupt

  Aqua Il 100
  Com Ed 100
  Farm & Fleet 0
  Frontier 191.9
  Meijers0  
Nicor 60  
Sears 0  
State Farm 103.73  
Verizon 171.84  

 

   

As you can see the meijers entry ignores the {right} command and the following line has the same issue.

I have used a function that brute forces the entry into the cells with the same effect.

I am currently at a loss and could use a new set of eyes on this. 

Thanks

Posted

There is an UDF available for LibreOffice. This way you can easily write data to a spreadsheet.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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...