Sign in to follow this  
Followers 0
Dizzy

_ExcelReadSheetToArray

6 posts in this topic

#1 ·  Posted (edited)

Hi,

i've to read some information out of many *.xlsx files.

I want to use _ExcelReadSheetToArray to do this, but i get following error:

C:\Program Files\AutoIt3\Include\Excel.au3 (791) : ==> Subscript used with non-Array variable.:

Local $iLastRow = $sLastCell[0]

Local $iLastRow = $sLastCell^ ERROR

->14:47:16 AutoIT3.exe ended.rc:1

>Exit code: 1 Time: 6.617

Is there a bug in excel.au3?

And what is the best way to get through the array to the last line (with differs ervery file)?

THANKS for any help

Dizzy

Edited by Dizzy

Share this post


Link to post
Share on other sites



I think the problem is caused by the combined cells you use for "Rechner Zusammenfassung" etc.and/or the contained line breaks.

Function _ExcelReadSheetToArray is not able to determine the last used cell and hence crashes.

If I remove the content the script runs fine.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

I think the problem is caused by the combined cells you use for "Rechner Zusammenfassung" etc.and/or the contained line breaks.

Function _ExcelReadSheetToArray is not able to determine the last used cell and hence crashes.

If I remove the content the script runs fine.

Hi water,

thanks for your reply.

Do you have a workaround to do this for 100 files?

Thanks

Dizzy

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Hmm - maybe it is better to go through every row - step by step ...?

But how do i get the lastline in the excel without using arrays?

Thanks

Dizzy

Edited by Dizzy

Share this post


Link to post
Share on other sites

Maybe this will help:

*Found using keyword: "Excel" in Forum Search

Share this post


Link to post
Share on other sites

Hi water,

i've searched for "excel" and even more.

And .... i was excatly at this post ( as one of 30 or more) ... but i've overlooked the last answer :(

I will do the search line by line and not over the array.

So - thanks for the hint! ^_^

Dizzy

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  
Followers 0