Set objFSO = CreateObject("Scripting.FileSystemObject") 'Open the input csv file for reading. The file is in the same folder as the script. Set objInFile = objFSO.OpenTextFile(objFSO.GetParentFolderName(WScript.ScriptFullName) &_ "\in.csv",1) 'Create the output html file. Set objOutHTML = objFSO.OpenTextFile(objFSO.GetParentFolderName(WScript.ScriptFullName) &_ "\out.html",2,True) 'Write the html opening tags. objOutHTML.Write "
" & vbCrLf 'Declare table properties. objOutHTML.Write "| X | Y | Z | |
|---|---|---|---|
| " & n & " | " For i = 0 To UBound(token) objOutHTML.Write "" & token(i) & " | " Next objOutHTML.Write "