Can someone please give me direction how to extract specific cell data from csv file and use it to create folder named by the same data.
For example: csv file has a cell with a date and I want to use it to create a folder.
Thanks you
Extract specific cell data from csv file
Re: Extract specific cell data from csv file
Read the file into a variable, then use nested loops that will parse the file until you get to the line you want (outer loop) and the item on that line (inner loop). Use Loop, Parse, with CSV as the delimiter for the inner loop.
Re: Extract specific cell data from csv file
Code: Select all
ColumnNr := 4
delimiter := ";"
Loop, Read, My.csv
{
Cell := StrSplit(A_LoopReadLine,delimiter)
MsgBox % Cell[ColumnNr]
}
Re: Extract specific cell data from csv file
idea , this is a script from 'BoBo'For example: csv file has a cell with a date and I want to use it to create a folder.
read first row/column-4 and creates a folder at desktop
Code: Select all
;-------- https://autohotkey.com/boards/viewtopic.php?f=5&t=40358 ---
f1=%a_scriptdir%\my.csv
ifnotexist,%f1%
{
e4x=
(
aaa;bbbb;ccc;ddd1;eee
aaa;bbbb;ccc;ddd2;eee
)
fileappend,%e4x%,%f1%
}
ColumnNr := 4
delimiter := ";"
Loop, Read,%f1%
{
Cell := StrSplit(A_LoopReadLine,delimiter)
aa:=Cell[ColumnNr]
;MsgBox % Cell[ColumnNr]
break
}
filecreatedir,%a_desktop%\%aa%
return
Re: Extract specific cell data from csv file
Reading CSV using COM https://autohotkey.com/boards/viewtopic ... 62#p152862
"When there is no gravity, there is absolute vacuum and light travel with no time" -Game changer theory
Re: Extract specific cell data from csv file
Reading CSV (not using COM) https://autohotkey.com/boards/viewtopic.php?f=6&t=34853
Re: Extract specific cell data from csv file
Thank you all. You gave me the direction I needed.
Who is online
Users browsing this forum: Descolada and 267 guests