Foros del Web » Programando para Internet » ASP Clásico »

Ver archivo desde un fichero en excel

Estas en el tema de Ver archivo desde un fichero en excel en el foro de ASP Clásico en Foros del Web. Hola, tengo un fichero en asp con el siguiente codigo (indicado mas abajo). Mi problema es que el fichero con extension xxx.xls tengo que ubicarlo ...
  #1 (permalink)  
Antiguo 18/06/2005, 05:50
 
Fecha de Ingreso: marzo-2004
Ubicación: Madrid (España)
Mensajes: 837
Antigüedad: 21 años, 1 mes
Puntos: 9
Ver archivo desde un fichero en excel

Hola, tengo un fichero en asp con el siguiente codigo (indicado mas abajo).
Mi problema es que el fichero con extension xxx.xls tengo que ubicarlo en el directorio c:\inetpub\wwwroot\ , sin embargo en el panel de control de servidor web que tengo, no existe ningun directorio al respecto.
¿Que debo hacer? Perdon por el desconocimiento del tema


Aqui esta el codigo:

<%
'Ensure that this page is not cached.
Response.Expires = 0
%>

<HTML>
<HEAD>
<title> Here is the code for displaying an Excel spreadsheet in a Web Page </title>
</HEAD>
<BODY>

<!-- This is an HTML comment -->
<%


'Creates an instance of an Active Server Component
Set oConn = Server.CreateObject("ADODB.Connection")

'Connects to the Excel driver and the Excel spreadsheet
'in the directory where the spreadsheet was saved
strConn = "Driver={Microsoft Excel Driver (*.xls)}; DBQ=C:\Inetpub\Wwwroot\ASPTOC.xls;"

'Opens the connection to the data store
oConn.Open strConn

'Selects the records from the Excel spreadsheet
'CellsToDisplay is the name that was defined in the Excel worksheet
strCmd = "SELECT * from CellsToDisplay"
Set oRS = Server.CreateObject("ADODB.Recordset")

'Opens the recordset
oRS.Open strCmd, oConn

'Prints the cells and rows in the table
Response.Write ("<table border=1><tr><td>")

'Gets records in spreadsheet as a string and prints them in the table
Response.Write oRS.GetString (, 10, "</tr><td>", "</td></tr><tr><td>", NBSPACE)
  #2 (permalink)  
Antiguo 19/06/2005, 01:21
Avatar de trasgukabi  
Fecha de Ingreso: septiembre-2004
Mensajes: 2.749
Antigüedad: 20 años, 7 meses
Puntos: 18
IIS, como todos los servidores web, se maneja por ALIAS. y el alias para c:\inetpub\wwwroot\ , por defecto, es "SITIO WEB PREDETERMINADO". Donde realmente tienes que buscar ese directorio en en tu disco duro.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 12:01.