Dizzy Posted August 30, 2012 Posted August 30, 2012 (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 September 4, 2012 by Dizzy
water Posted August 30, 2012 Posted August 30, 2012 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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Dizzy Posted August 30, 2012 Author Posted August 30, 2012 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?ThanksDizzy
Dizzy Posted August 30, 2012 Author Posted August 30, 2012 (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 August 30, 2012 by Dizzy
Reg2Post Posted August 30, 2012 Posted August 30, 2012 Maybe this will help:*Found using keyword: "Excel" in Forum Search
Dizzy Posted August 30, 2012 Author Posted August 30, 2012 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now