> I tried to read a text file using the Textstream object and each file
line has 4 elements. How do I put them in 4 separate table cells?
How are the elements separated? Let's say there is a pipe delimiter,
delimiter = "|" ' or comma, if tab use CHR(9) or vbTab
set fso = server.createobject("Scripting.FileSystemObject")
set fs = fso.openTextFile("c:\path\file.txt")
f = fs.readall()
fs.close: set fs = nothing: set fso = nothing
response.write "<table>"
rows = split(f, vbCrLf)
for i = 0 to ubound(rows)
response.write "<tr>"
cols = split(rows(i), "|")
for j = 0 to ubound(cols)
response.write "<td>" & cols(j) & "</td>"
next
response.write "</tr>"
next