I have a while loop defined, in which I would like to write values to csv file,
for example loop value. I would like to have this csv file contain format: value;value;value etc
example:
while (i <= 10)
{
"write i to csv file"
}
close csv file
Who can help me with this? With helpfull code.
write to CSV file
Re: write to CSV file
Hi,
FileAppend might be an interesting option for you.
For example, you could use this code:
`n is a line break.
This means your result would be:
1
2
3
4
etc.
Otherwise it would be 12345.
If you want it this way, simply remove the `n
Your csv file should be located in the same dir where your ahk script is.
If there is an issue with csv, use txt.
Regards
FileAppend might be an interesting option for you.
For example, you could use this code:
Code: Select all
Loop, 10
{
i++
FileAppend, `n%i%, Your file.csv
}
return
This means your result would be:
1
2
3
4
etc.
Otherwise it would be 12345.
If you want it this way, simply remove the `n
Your csv file should be located in the same dir where your ahk script is.
If there is an issue with csv, use txt.
Regards
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Re: write to CSV file
that helped very much. Thanks!
Who is online
Users browsing this forum: Holarctic, jameswrightesq and 437 guests