|
-
Jan 24th, 2006, 02:44 PM
#1
Thread Starter
Lively Member
Creating an HTML file from a Text File
hi all !
can we create an html file from a text file . The Text file has contents that are comma separated.
Please Advice
Cheers
KK
-
Jan 24th, 2006, 02:48 PM
#2
Re: Creating an HTML file from a Text File
Try something as simple as
VB Code:
Name "c:\hack.txt" As "c:\hack.htm"
-
Jan 24th, 2006, 02:53 PM
#3
Thread Starter
Lively Member
Re: Creating an HTML file from a Text File
hi !
thanks...
my text file has a structure like this
Code:
10:00 am,hi there
10:01 am,how are you
incase i use
Code:
Name "c:\hack.txt" As "c:\hack.htm"
, when i open the html file, the text is not properly structure , as in look does not match with the test file
is there any way , the look of html file can be made same as text file
i mean row and column wise
-
Jan 24th, 2006, 05:12 PM
#4
Re: Creating an HTML file from a Text File
To do formatting you'll need to add proper HTML tags.
Add HTML tags around your text like,
(writing from memory)
VB Code:
Dim strNewTxtData As String
strNewTxtData = "<HTML>" & _
"<TITLE>My Html File</TITLE>" & _
"<BODY>" & _
"This is a line" & "<br>" & _
"this is another line" & _
"</BODY>" & _
"</HTML>"
Dim F As Integer
F = FreeFile
Open "C:\MyHtmlFile.html" For Output As #F
Print #F, strNewTxtData
Close #F
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|