CSV to ListView?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
TheDewd
Posts: 1513
Joined: 19 Dec 2013, 11:16
Location: USA

CSV to ListView?

25 Feb 2014, 17:03

How can I take this example CSV and parse it into a ListView with three columns?

CSV:

Code: Select all

Name, Extension, Location
Name, Extension, Location
Name, Extension, Location
Name, Extension, Location
Name, Extension, Location
Name, Extension, Location
Name, Extension, Location
Name, Extension, Location
User avatar
AlphaBravo
Posts: 586
Joined: 29 Sep 2013, 22:59

Re: CSV to ListView?

25 Feb 2014, 17:21

Code: Select all

data =
(
Name, Extension, Location
Name, Extension, Location
Name, Extension, Location
Name, Extension, Location
Name, Extension, Location
Name, Extension, Location
Name, Extension, Location
Name, Extension, Location
)
Gui, add, listview, w300 r10 , Name|Extension|Location
Gui, show
loop, parse, data, `n
{
    x:=[]
    loop, parse, A_LoopField, CSV
        x.Insert(A_LoopField)
    LV_Add("", x*)
}
LV_ModifyCol()
return
elmo
Posts: 113
Joined: 09 Oct 2013, 09:08

Re: CSV to ListView?

25 Feb 2014, 18:49

That is way cool AlphaBravo.

I had no idea you could drop an array on lv_add like that.

Thanks.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 137 guests