Jump to content

Arrays


Recommended Posts

Ok so I have an excel sheet and want to loop through on row at a time and get its value (only one row that I care about).

In the past I have written a PHP script that does this and outputs a string of comma-delimited values.

Is there no way of declaring and filling an array with more then one value in AutoIt? From what I have seen it seems like you need to call a function to add each individual value to the array. If this is the case, it might be easier for me to learn about the Excel EUDs (I think that was the acronym) that I have seen as well.

Would someone be so kind as to let me know what would be the best approach. A summary of the goal:

I have a script written that is working for a given value. I want to cycle through an excel sheet and do the same thing with each value in the sheet.

Thanks in advance.

Link to comment
Share on other sites

Ok so I have an excel sheet and want to loop through on row at a time and get its value (only one row that I care about).

This is confusing, but I assume you mean you are only interested in one column for each row.

In the past I have written a PHP script that does this and outputs a string of comma-delimited values.

Is there no way of declaring and filling an array with more then one value in AutoIt? From what I have seen it seems like you need to call a function to add each individual value to the array. If this is the case, it might be easier for me to learn about the Excel EUDs (I think that was the acronym) that I have seen as well.

You can prefill an array when it is declared, though I don't see what that has to do with the rest of your post:
Global $avArray[3] = ["x", "y", "z"]

Would someone be so kind as to let me know what would be the best approach. A summary of the goal:

I have a script written that is working for a given value. I want to cycle through an excel sheet and do the same thing with each value in the sheet.

Thanks in advance.

I would read that column to an array once with _ExcelReadArray(), loop through the array with a For/Next loop to make changes, then write the array back to the column just once with _ExcelWriteArray().

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

You can prefill an array when it is declared, though I don't see what that has to do with the rest of your post:

Global $avArray[3] = ["x", "y", "z"]

:)

Thanks very much, thats what I was after... for some reason I couldn't hunt this down in the documentation...
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...