Hi,
Trying to export output from different variables to different columns of Excel or csv file. Is that possible? Tried to look in the forum but could not find it.
e.g.
@echo %var1% %var2% %var3% >> whatever.xlsx
where the variable values of three variables should end up in A1, B1 and C1 cells.
Thanks,
Bobby
Output to excel/csv file
Moderator: DosItHelp
Re: Output to excel/csv file
With following code you will write the value to the csv file.
"CSV" is comma seperated value
With the test batch can you save this row by row.
Code: Select all
@echo off
set dat=Test.csv
set vara=Anton
set varb=Berta
set varc=Caesar
echo "letter A","%vara%">%dat%
echo "letter B","%varb%">>%dat%
echo "letter C","%varc%">>%dat%
echo.>>%dat%
echo ,"three">>%dat%
"CSV" is comma seperated value
With the test batch can you save this row by row.
Re: Output to excel/csv file
Thanks! Even though it was not the output I had intended but it gave me the right direction