Jump to content
Sign in to follow this  
CEBSS

Closed

Recommended Posts

CEBSS

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

Share this post


Link to post
Share on other sites
enaiman

Do 
;Excel write 
Until $data = ""

where $data is the text string you want to write


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites
CEBSS

Do 
;Excel write 
Until $data = ""

where $data is the text string you want to write

Sorry i am still clueless.

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

Share this post


Link to post
Share on other sites
enaiman

Posting some code will definitely help people to decide to help you.

Show what you tried so far (I'm not in a mood to waste time to build you a working example).


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites
anunes

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

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.