Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
Thread: read file separated by tab
07-04-2007, 07:04 PM #1
- Join Date
- May 2004
- Thanked 0 Times in 0 Posts
read file separated by tab
I have a file that has 2 collumns separated by a tab.
i want to convert this to an html table
how would I read a line and separate it that it's
<tr><td>coll 1 </td><td>col2</td></tr> for each line
my file is col1 tab col2 now
07-05-2007, 01:58 PM #2
- Join Date
- Mar 2007
- Thanked 19 Times in 19 Posts
In ASP, you can use the Scripting.FileSystemObject to search the file for chr(9) (tab) and vbCrLf (Carriage Return, Line Feed), then do a replace.
Last edited by Daemonspyre; 07-05-2007 at 02:17 PM.
Please, if you found my post helpful, pay it forward. Go and help someone else today.To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
07-05-2007, 05:17 PM #3
the replace string would be something like
outputvar = "<tr><td>"
while readline whatever not EOF
outputvar=outputvar & replace(readintextfilecontents,vbTab,"</td><td>")
outputvar=outputvar & replace(readintextfilecontents,vbCRLF,"</td></tr>")
something like that anyway (my god its been years since i've done asp )