source: How to find and replace a string in text file using batch file
just replace “,” with html table tag.
@echo off setlocal enabledelayedexpansion set txtfile=%~1 set newfile=Output.html if exist "%newfile%" del /f /q "%newfile%" echo ^<table border='1'^> >> %newfile% for /f "tokens=*" %%a in (%txtfile%) do ( set newline=%%a set newline=^<tr^>^<td^>!newline:,=^</td^>^<td^>!^</td^>^</tr^> echo !newline! >> %newfile% ) echo ^</table^> >> %newfile%
use vba in excel : http://analystcave.com/excel-export-excel-to-html-convert-tables-html/