Jump to content
Sign in to follow this  

Transpose array - I don't understand

Recommended Posts

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 


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)

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.


Share this post

Link to post
Share on other sites

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


 if you want to use the _ArrayTranspose statement, you should use it like this:

_ArrayTranspose( $aTableData)
Edited by PincoPanco

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

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  

  • Create New...