El codigo lo obtuve en este foro, como prodran ver no cambie nada..., o creo
que casi nada..., al final esta lo que sale
mezcla de HTML y el archivo csv, estoy buscando en el help de visual
interdev, para entender el codigo
Gracias
Saludos
Mario
<body bgcolor="#FFFFFF" text="#000000">
<%
DIM FICHERO
DIM strPATH
FICHERO = request.QUERYSTRING("nombre")
strPATH="vt_ventas"
'RESPONSE.WRITE "<br>" & fichero & "<br>" & strPATH
'RESPONSE.WRITE "<br>" & Server.Mappath(strPath & "/" & fichero)
response.contentType = "application/x-unknow"
response.addHeader "Content-Disposition","fattachment; filename=" & chr(34)
& fichero & chr(34)
response.BinaryWrite getBinaryFile( Server.Mappath(strPath & "/" &
fichero) )
function getBinaryFile(fileSpec)
Dim adTypeBinary
Dim oStream
adTypeBinary = 1
set oStream = server.createobject("ADODB.Stream")
oStream.Open
oStream.Type = adTypeBinary
oStream.LoadFromFile fileSpec
getBinaryFile = oStream.read
set oStream = Nothing
end function
%>
</body>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
.
.
.
22/12/2003,83,JUAN JOSE,EFECTIVO,CF , ,B -330, 23.55,21.00, 4.95,0.00,
0.00, 0.00, 0.00, 28.50,ACAZON, , , , , , , ,
22/12/2003,367,GRAICELA HILDA,EFECTIVO,CF , ,B -337, 15.70,21.00,
3.30,0.00, 0.00, 0.00, 0.00, 19.00,ACAZON, , , , , , ,
,
.
.
.
</body>
</html>
Leer las respuestas