got the code below,
it takes the entires from certain columns, (Columns := ["B","C","F","E","Q"])
how i can now use the variables/arrays frow each column (Display .= Index "`t" Value "`n")
and copy the content into a new excel file,coloumn for column
example the content from (Excel File 1) Row B -> into (Excel file 2) Row A
Code: Select all
; Create a connection between AHK and an open active Excel file
; MsgBox % XL.range("A1").text
Columns := ["B","C","F","E","Q"]
Data := {}
; Get all cell values in columns and put in an array
for Index, Column in Columns
for xlCell in XL.ActiveSheet.UsedRange.Columns(Column).Cells
Data[Column, A_Index] := xlCell.Value
; Display all the values in Column Q
for Index, Value in Data.Q
Display .= Index "`t" Value "`n"
msgbox % Display