Jump to content

Array dimension range Exceeded calling from Excel.


Ram
 Share

Recommended Posts

Hi,

I have few data in an excel that has around 313 Rows and 10 columns each. All the rows have the same personal data but different age.

I have created a array such that all these rows are written on the array first and then I use the array later in the script using a for loop 1 to 313.

Here is what I do:

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

$aColumnA = _ExcelReadArray($oExcel, 1, 1, 7, 1)

$aColumnB = _ExcelReadArray($oExcel, 1, 2, 7, 1)

$aColumnC = _ExcelReadArray($oExcel, 1, 3, 7, 1)

$aColumnD = _ExcelReadArray($oExcel, 1, 4, 7, 1)

$aColumnE = _ExcelReadArray($oExcel, 1, 5, 7, 1)

$aColumnF = _ExcelReadArray($oExcel, 1, 6, 7, 1)

$aColumnG = _ExcelReadArray($oExcel, 1, 7, 7, 1)

$aColumnH = _ExcelReadArray($oExcel, 1, 8, 7, 1)

$aColumnI = _ExcelReadArray($oExcel, 1, 9, 7, 1)

$aColumnJ = _ExcelReadArray($oExcel, 1, 10, 7, 1)

For loop works just fine on until 6th row is entered. When it starts the 7th Row. I get the below error:

C:\dataentry.au3 (206) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:

$Filepath = "C:\" & $aColumnB[$i] & $aColumnD[$i]

$Filepath = "C:\" & ^ ERROR

What is wrong?

Awaiting your response!

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