Hi
Ive a page as below and it will save the record to text, but it does not save
the file as what I needed.
when i open up the file it didplaay the value in table format <td> </td> with
html tag, I only need the values from database exclude the html tag it's also
happen same thing when I use excel to save the records.. pls help me

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Response.ContentType = "application/vnd.ms-notepad"
Response.AddHeader "content-disposition","attachment;filename=TataReport.txt"
%>
<!--#include file="Connections/XXX_VB.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_FTI_VB_STRING
Recordset1.Source = "SELECT a.id, b.hexesn as SN1, a.creationdate,
a.deliverydate, c.serialnumber as SN2, d.serialnumber as SN3, a.lastupdate,
a.lineid, a.modelid, a.productstateid, b.esn as esn,b.damps as damps, b.min
as min,b.min2 as min2,b.hexesn as hexesn, b.msn as msn,b.generate_spc as
generate_spc,b.generate_akey as generate_akey,e.partnumber, e.revision, b.spc
as spc,b.generate_spc3 as generate_spc3,b.spc3 as spc3,b.mcc as mcc FROM
product a with(nolock) inner join productdetail b on a.id = b.productid left
outer join package c with(nolock) on a.packageid = c.id left outer join
package d with(nolock) on a.outmostpackageid = d.id left outer join
productstructure e with(nolock) on a.productstructureid = e.id left outer
join workorder f with(nolock) on a.workorderid = f.workorderid left outer
join senttata st on a.serialnumber=st.rsn WHERE st.hexesn in (select
distinct hexesn from logisticesn)"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" Response.ContentType =
"application/vnd.ms-notepad"
>
<response.AddHeader "Content-Disposition","attachment;filename.txt"
>
</head>
<body>
<table border="0">
<tr>
<td>id</td>
<td>SN1</td>
<td>creationdate</td>
<td>deliverydate</td>
<td>SN2</td>
<td>SN3</td>
<td>lastupdate</td>
<td>lineid</td>
<td>modelid</td>
<td>productstateid</td>
<td>esn</td>
<td>damps</td>
<td>min</td>
<td>min2</td>
<td>hexesn</td>
<td>msn</td>
<td>generate_spc</td>
<td>generate_akey</td>
<td>partnumber</td>
<td>revision</td>
<td>spc</td>
<td>generate_spc3</td>
<td>spc3</td>
<td>mcc</td>
</tr>
<% While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF)) %>
<tr>
<td><%=(Recordset1.Fields.Item("id").Value)%></td>
<td><%=(Recordset1.Fields.Item("SN1").Value)%></td>
<td><%=(Recordset1.Fields.Item("creationdate").Val ue)%></td>
<td><%=(Recordset1.Fields.Item("deliverydate").Val ue)%></td>
<td><%=(Recordset1.Fields.Item("SN2").Value)%></td>
<td><%=(Recordset1.Fields.Item("SN3").Value)%></td>
<td><%=(Recordset1.Fields.Item("lastupdate").Value )%></td>
<td><%=(Recordset1.Fields.Item("lineid").Value)% ></td>
<td><%=(Recordset1.Fields.Item("modelid").Value)%> </td>
<td><%=(Recordset1.Fields.Item("productstateid").V alue)%></td>
<td><%=(Recordset1.Fields.Item("esn").Value)%></td>
<td><%=(Recordset1.Fields.Item("damps").Value)%> </td>
<td><%=(Recordset1.Fields.Item("min").Value)%></td>
<td><%=(Recordset1.Fields.Item("min2").Value)%></td>
<td><%=(Recordset1.Fields.Item("hexesn").Value)% ></td>
<td><%=(Recordset1.Fields.Item("msn").Value)%></td>
<td><%=(Recordset1.Fields.Item("generate_spc").Val ue)%></td>
<td><%=(Recordset1.Fields.Item("generate_akey").Va lue)%></td>
<td><%=(Recordset1.Fields.Item("partnumber").Value )%></td>
<td><%=(Recordset1.Fields.Item("revision").Value)% ></td>
<td><%=(Recordset1.Fields.Item("spc").Value)%></td>
<td><%=(Recordset1.Fields.Item("generate_spc3").Va lue)%></td>
<td><%=(Recordset1.Fields.Item("spc3").Value)%></td>
<td><%=(Recordset1.Fields.Item("mcc").Value)%></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%>
</table>
<p>&nbsp;</p>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>