Jump to content

Recommended Posts

Posted

I have value around 7000 rows and 8 columns. I am putting them on a array and calling the array in process through a for loop.. When starting the script the process takes lot of time as I know it is because of 7000 rows and 8 column that needs to be put in an array..

Can you tell me any workaround to solve the slow processing issue? or any other way to get 7000 data to the array.

Awaiting your response!

Thanks!

  • Moderators
Posted

I have value around 7000 rows and 8 columns. I am putting them on a array and calling the array in process through a for loop.. When starting the script the process takes lot of time as I know it is because of 7000 rows and 8 column that needs to be put in an array..

Can you tell me any workaround to solve the slow processing issue? or any other way to get 7000 data to the array.

Awaiting your response!

Thanks!

A question wrapped in an enigma.

Why don't you post your array structure, how you are importing the data, and how we can re-create maybe to help you save some time.

(P.S. - The array limitation is right in the help file... )

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted (edited)

A question wrapped in an enigma.

Why don't you post your array structure, how you are importing the data, and how we can re-create maybe to help you save some time.

(P.S. - The array limitation is right in the help file... )

This what I have done.. I call the excel file put them in the array and call them using the for loop.

$oExcel = _ExcelBookOpen("C:\test.xls") 

$aColumnAB  = _ExcelReadArray ($oExcel, 1, 1,  7000, 1) 
$aColumnC   = _ExcelReadArray ($oExcel, 1, 3,  7000, 1) 
$aColumnD   = _ExcelReadArray ($oExcel, 1, 4,  7000, 1) 
$aColumnE   = _ExcelReadArray ($oExcel, 1, 5,  7000, 1) 
$aColumnF   = _ExcelReadArray ($oExcel, 1, 6,  7000, 1)
$aColumnG   = _ExcelReadArray ($oExcel, 1, 7,  7000, 1) 
$aColumnH   = _ExcelReadArray ($oExcel, 1, 8,  7000, 1) 
$aColumnI   = _ExcelReadArray ($oExcel, 1, 9,  7000, 1)
$aColumnJ   = _ExcelReadArray ($oExcel, 1, 10, 7000, 1)
$aColumnK   = _ExcelReadArray ($oExcel, 1, 11, 7000, 1)

I looked at the help file already - Limits/Defaults page but I didn't find any info on array.

Edited by Ram
  • Moderators
Posted

You'd have to look at the _ExcelReadArray() function to see if you could speed it up. I believe that is a UDF made by a user (not in my help file anyway). So the limitations are not just autoit, it would be how it was coded to begin with.

On the limitations of AutoIt.

1. Open Help File

2. Go to Contents

3. Click the + tab on AutoIt

4. Click the + tab on Appendix

5. The first option should be AutoIt Limitations

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted

Saving the xls file as a CSV might be quicker, then read the whole file in to a $variable. Split the lines by $arrayofLines=StringSplit($variable,@crlf,1) then step through each row and StringSplit() each row a by the comma, then add the $row[$splitNo] to the $mainarray.

  • Moderators
Posted

Saving the xls file as a CSV might be quicker, then read the whole file in to a $variable. Split the lines by $arrayofLines=StringSplit($variable,@crlf,1) then step through each row and StringSplit() each row a by the comma, then add the $row[$splitNo] to the $mainarray.

Wouldn't StringRegExp() be faster and less work?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted

Saving the xls file as a CSV might be quicker, then read the whole file in to a $variable. Split the lines by $arrayofLines=StringSplit($variable,@crlf,1) then step through each row and StringSplit() each row a by the comma, then add the $row[$splitNo] to the $mainarray.

agreed, why would one need an array with 7000 things in it? mind your ram :)
  • Moderators
Posted

agreed, why would one need an array with 7000 things in it? mind your ram :)

7000 x's 8 you mean ;) ... (56,000) "things"

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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
  • Recently Browsing   0 members

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