tempman Posted January 16, 2013 Posted January 16, 2013 #include <Excel.au3> #include <Array.au3> $sFilePath1 = @ScriptDir & "\ipligence-lite.xlsx" Local $oExcel = _ExcelBookOpen($sFilePath1, 0) $aArray = $oExcel.Activesheet.Range("A1:A170241").Value _ArrayDisplay($aArray) _ExcelBookClose($oExcel, 0, 0) Exit array is display in coloms and i want to display it in rows
water Posted January 16, 2013 Posted January 16, 2013 Haven't tested it but I think the array is to large to use the Excel transpose function: $aArrayTransposed = $oExcel.Transpose($aArray) If it crashes you have to manually create the new array. 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
tempman Posted January 16, 2013 Author Posted January 16, 2013 since I am 67 posts memeber you need to show me where to put that line?
jdelaney Posted January 16, 2013 Posted January 16, 2013 (edited) maybe: _ArrayDisplay(Const ByRef $avArray [, $sTitle = "Array: ListView Display" [, $iItemLimit = -1 [, $iTranspose = 0 [, $sSeparator = "" [, $sReplace = "|" [, $sHeader = ""]]]]]])But who cares how the array is displayed, what are you attempting to do with the data: that's where the logic of the script comes into playIf you want to actually take the data of the column, and transpose to the rows, you will cutt off some of your data...there are not that many columns avaialbe in excel 2010 Edited January 16, 2013 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
water Posted January 16, 2013 Posted January 16, 2013 After line: $aArray = $oExcel.Activesheet.Range("A1:A170241").Value 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
tempman Posted January 16, 2013 Author Posted January 16, 2013 #include <Excel.au3> #include <Array.au3> $sFilePath1 = @ScriptDir & "\ipligence-lite.xlsx" Local $oExcel = _ExcelBookOpen($sFilePath1, 0) $aArray = $oExcel.Activesheet.Range("A1:A170241").Value $aArrayTransposed = $oExcel.Transpose($aArray) _ArrayDisplay($aArrayTransposed) _ExcelBookClose($oExcel, 0, 0) Exit >Running:(3.3.8.1):C:\Program Files\AutoIt3\autoit3.exe "D:\z.au3" --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop D:\z.au3 (8) : ==> The requested action with this object has failed.: $aArrayTransposed = $oExcel.Transpose($aArray) $aArrayTransposed = $oExcel.Transpose($aArray)^ ERROR ->20:04:39 AutoIT3.exe ended.rc:1 >Exit code: 1 Time: 5.025
water Posted January 16, 2013 Posted January 16, 2013 Looks like the array is too large for Excel. In this case you either need to transpose the table yourself. Or if you just need to process the table then process rows as columns and columns as rows. 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
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