Jump to content
Sign in to follow this  
Dizzy

_ExcelReadSheetToArray

Recommended Posts

Dizzy

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
water

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 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Dizzy

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
Dizzy

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
Reg2Post

Maybe this will help:

*Found using keyword: "Excel" in Forum Search

Share this post


Link to post
Share on other sites
Dizzy

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  

×