Jump to content

Closed


Recommended Posts

Hi Guys

I know how to write to a excel column (to replace data) if it is a set amount of rows. (ie 20 rows)

How do I make a loop to write to a column until there is no more data to replace.

I want to run a continues loop replacing data in a column till there is no data to be replaced

eg: column 3 is "customer name" now the name needs to be changed. The length of rows vary from client to client.

Alistair

Edited by CEBSS
Link to comment
Share on other sites

Sorry i am still clueless.

There should be a AUTOIT FOR DUMMIES for peaple like myself.

something like this:

#include <Excel.au3>

Local $oExcel = _ExcelBookNew() ;Create new book, make it visible

For $i = 1 To 5 ;Loop
    _ExcelWriteCell($oExcel, $i, $i, 1) ;Write to the Cell
Next
$i = 1
Global $x = -1
Do
    $sCellValue = _ExcelReadCell($oExcel, $i, 1)
    $i = $i + 1
    $x = $x + 1
Until $sCellValue = ""

For $i = 1 To $x
    _ExcelWriteCell($oExcel, "Value", $i, 1)
Next
Edited by anunes
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...