Const ForWriting = 2
Dim fso, f
Dim conn
Dim input
Dim filename
filename="c:\name.xls"
Set conn= createobject("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source="&filename&";Extended Properties='Excel 8.0;hdr=yes'"
Set input= createobject("ADODB.Recordset")
input.Open "select * from [sheet1$] " ,conn,2,2
Dim i
While Not input.eof
i=i+1
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("c:\testfile" &i &".html", ForWriting, True)
html="HTML"