AH read CSV

카테고리 없음 2020. 4. 22. 17:10

20200422 1709

 

01 Input

zi,1,2,3,
name,acomp,bbank,ccoffee
amount,100,474,12345

 

02 codes

dict := {}
Loop, Read, zTestCSV.csv
{
	row := StrSplit(A_LoopReadLine, ",")
	key := row[1]
	row.RemoveAt(1)
	dict[key] := row
}

; TEST
For Key,Val in dict
{
	Output := "Key '" Key "' has: "
	Loop % Val.Length()
	{
		Output .= Val[A_Index] ", "
	}
	MsgBox % Output
}
ExitApp
ESC::ExitApp
Posted by Weneedu
,


출처: https://privatedevelopnote.tistory.com/81 [개인노트]