ASP - Problema al abrir fichero Excel

 
Vista:

Problema al abrir fichero Excel

Publicado por moretti3000 (3 intervenciones) el 22/03/2007 17:31:55
El problema consiste en que yo quiero que al hacer doble click sobre una celda de la tabla se abra un fichero excel , para cada celda se abrira un fichero distinto pero el problema es que se abren tantos ficheros como celdas al cargar la pagina asp sin hacer nada

<script language="vbscript" runat="server">
sub AbrirExcel
Set appExcel = Server.CreateObject("Excel.Application")
appExcel.workbooks.open ("C:\Inetpub\wwwroot\MisPruebasAsp\Excel.xls")
appExcel.Visible = True
end sub
</script>



<table width="951" border="1" align="center" bgcolor="#FFFF66" bordercolor="#000000" >
<tr>
<th width="218" bgcolor="#66FFFF" > Seccion</th>
<th width="132"bgcolor="#66FFFF" >CodigoMaquina</th>
<th width="90" bgcolor="#66FFFF">NºPosicion</th>
<th width="189"bgcolor="#66FFFF" >Descripcion</th>
<th width="86" bgcolor="#66FFFF">NºPlano</th>
<th width="194"bgcolor="#66FFFF" >FichaMaquina</th>
</tr>

<% do while not rs.eof%>
<tr>
<td width="218"><%response.write(rs("Seccion"))%> </td>
<td width="132"><%response.write(rs("CodMaquina"))%></td>
<td width="90"><%response.write(rs("NºPosicion"))%></td>
<td width="189"><%response.write(rs("Descripcion"))%></td>
<td width="86"><%response.write(rs("NºPlano"))%></td>
<td width="194" ondblclick="<%AbrirExcel%>">
<%response.write(rs("Descripcion"))%></td>
</tr>
<%rs.movenext
loop
Conn.close%>

</table>
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder