Jewtus Posted April 23, 2014 Posted April 23, 2014 Hello everyone, Please forgive me if this is a dumb question, I'm very new to autoit. I'm trying to extract a table from a web portal and I have most of the script working. Local $oTable = _IETableGetCollection($oIE, 1) Local $aTableData = _IETableWriteToArray($oTable) I tried writing the output to a file, which worked... sort of Local $sFilePath = "C:\Automation\AutoIt\Example.csv" _FileWriteFromArray($sFilePath, $aTableData, 1) The file seems all sorts of messed up, so I tried using _ArrayDisplay($aTableData) And that is when I figured out it was grabbing the table transposed. I have an output 7 rows 51 columns. I've been trying to transpose them, but I'm not sure I understand the syntax. Local $test [7][51] = _ArrayTranspose( ByRef $aTableData) _ArrayDisplay($test) Can someone steer me in the right direction? I'd like to ultimately output the file to CSV (or pipe it directly into SQLite) but I'm having some trouble figuring out how to actually transpose the data.
Solution Gianni Posted April 23, 2014 Solution Posted April 23, 2014 (edited) Hi Jewtus have you tried to use the "transpose" parameter directly in the _IETableWriteToArray() statement? Local $oTable = _IETableGetCollection($oIE, 1) Local $aTableData = _IETableWriteToArray($oTable, True) ; <-- add True here also, if you want to use the _ArrayTranspose statement, you should use it like this: _ArrayTranspose( $aTableData) _ArrayDisplay($aTableData) Edited April 23, 2014 by PincoPanco Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
Jewtus Posted April 24, 2014 Author Posted April 24, 2014 Hi Jewtus have you tried to use the "transpose" parameter directly in the _IETableWriteToArray() statement? Local $oTable = _IETableGetCollection($oIE, 1) Local $aTableData = _IETableWriteToArray($oTable, True) ; <-- add True here I didn't know that was even a thing... THANK YOU!!!
Gianni Posted April 24, 2014 Posted April 24, 2014 You are welcome Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
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