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

leer un excel exportado desde asp.

Estas en el tema de leer un excel exportado desde asp. en el foro de ASP Clásico en Foros del Web. hola.. he probado varios codigos para leer excel y todos me funcionan perfecto para cuando son excel creados desde mi computador.. pero cuando son excel ...

  #1 (permalink)  
Antiguo 27/05/2009, 08:02
Avatar de lexus  
Fecha de Ingreso: enero-2002
Ubicación: Cali - Colombia
Mensajes: 2.234
Antigüedad: 23 ańos, 3 meses
Puntos: 4
Desacuerdo leer un excel exportado desde asp.

hola..

he probado varios codigos para leer excel y todos me funcionan perfecto para cuando son excel creados desde mi computador..
pero cuando son excel creados por una aplicacion asp es decir con este codigo:

Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "attachment; filename=excel_productos.xls"

ya no me los lee siempre ke son creados por el servidor me sale este error
[Microsoft][Controlador ODBC Excel]Error general No se puede abrir la clave 'Temporary (volatile) Jet DSN for process 0x8ac Thread 0x1004 DBC 0x1453024 Excel' del Registro.


pero cuando los creo manualmente por office como crear un excel cualquiera si me lo lee perfectamente. ke diferencia tiene?


no publico el codigo de leer excel aqui porke tengo muchos y con todos me funciona bien como explico anteriormente en todos los casos me pasa lo mismo. el problema pareciera venir cuando se crea el excel desde el asp
__________________
Control de Visitantes, Control de Accesos, Minutas digitales, Manejo de Correspondencia
http://www.controldevisitantes.com
  #2 (permalink)  
Antiguo 27/05/2009, 10:35
Avatar de Esfinge02  
Fecha de Ingreso: septiembre-2008
Ubicación: Cd. Victoria Tam
Mensajes: 162
Antigüedad: 16 ańos, 7 meses
Puntos: 2
Respuesta: leer un excel exportado desde asp.

que office tienes, allí radia uno de los problemas, ya que el código los guardad par versiones de excel 98, 2000 y cuando los cargas al 2007 causa algunos errores de incompatibilidad, lo que puedes hacer es cambiar la extencion del archivo a la hora de combertirlo, aun que esto podría causar conflictos con usuarios que no tengan los paquetes de compatibilidad, o simple mente busca el parche para leer bien las versiones anteriores, XDXDXD
__________________
La ignorancia es una bendición o un privilegio, yo lo siento programadores
  #3 (permalink)  
Antiguo 27/05/2009, 10:39
Avatar de Esfinge02  
Fecha de Ingreso: septiembre-2008
Ubicación: Cd. Victoria Tam
Mensajes: 162
Antigüedad: 16 ańos, 7 meses
Puntos: 2
Pregunta Respuesta: leer un excel exportado desde asp.

aunque tambien puedes provar con este codigo,
Código:
 <%
	response.ContentType = "application/vnd.ms-excel"
	response.AddHeader "content-disposition", "inline; filename=informacion.xls"
 %>
__________________
La ignorancia es una bendición o un privilegio, yo lo siento programadores
  #4 (permalink)  
Antiguo 27/05/2009, 13:27
Avatar de lexus  
Fecha de Ingreso: enero-2002
Ubicación: Cali - Colombia
Mensajes: 2.234
Antigüedad: 23 ańos, 3 meses
Puntos: 4
Respuesta: leer un excel exportado desde asp.

tambien lo he probado con inline.. y sigue igual.. me funciona cuando el excel es creado por mi
pero cuando es creado por el asp no funciona..
tengo office 2003.
__________________
Control de Visitantes, Control de Accesos, Minutas digitales, Manejo de Correspondencia
http://www.controldevisitantes.com
  #5 (permalink)  
Antiguo 27/05/2009, 15:14
Avatar de AlZuwaga
Colaborador
 
Fecha de Ingreso: febrero-2001
Ubicación: 34.517 S, 58.500 O
Mensajes: 14.550
Antigüedad: 24 ańos, 2 meses
Puntos: 535
Respuesta: leer un excel exportado desde asp.

Creo que el problema es que el "archivo de excel" generado por ASP no es realmente un archivo de excel sino un documento html con extensión XLS. Entonces, claro, cuando intentás conectarte a este por medio de ODBC te manda al carajo porque, a fin de cuentas, no es un archivo de excel verdadero.
__________________
...___...
  #6 (permalink)  
Antiguo 27/05/2009, 17:55
Avatar de lexus  
Fecha de Ingreso: enero-2002
Ubicación: Cali - Colombia
Mensajes: 2.234
Antigüedad: 23 ańos, 3 meses
Puntos: 4
Respuesta: leer un excel exportado desde asp.

te cuento un poco.. tengo un asp que genera un excel y es guardado en el cliente..

luego subo ese excel por medio de xelupload al servidor y luego ahi es leido por otro asp.
y es ahi en la lectura donde tengo problemas.. solo cuando el excel o sea mi archivo.xls es generado por el asp no lo lee pero si subo un archivo creado por mi computador ahi si lo lee sin problemas..

pero el archivo que genera mi asp es un archivo de excel creo yo.. porke tiene extension .xls.


no se en ke pueda estar fayando.
__________________
Control de Visitantes, Control de Accesos, Minutas digitales, Manejo de Correspondencia
http://www.controldevisitantes.com
  #7 (permalink)  
Antiguo 27/05/2009, 20:10
Avatar de AlZuwaga
Colaborador
 
Fecha de Ingreso: febrero-2001
Ubicación: 34.517 S, 58.500 O
Mensajes: 14.550
Antigüedad: 24 ańos, 2 meses
Puntos: 535
Respuesta: leer un excel exportado desde asp.

Cita:
pero el archivo que genera mi asp es un archivo de excel creo yo.. porke tiene extension .xls
lexus, haceme un favor. Cambiale la extensión a ese archivo XLS que fue generado mediante ASP. Ponele de extensión TXT y abrilo con el block de notas. Luego copiá su contenido y pegalo aquí en el foro. Es para quitarme la duda. Gracias
__________________
...___...
  #8 (permalink)  
Antiguo 27/05/2009, 20:26
Avatar de lexus  
Fecha de Ingreso: enero-2002
Ubicación: Cali - Colombia
Mensajes: 2.234
Antigüedad: 23 ańos, 3 meses
Puntos: 4
Respuesta: leer un excel exportado desde asp.

le di click derecho al .xls y lo abri con block de notas y me salio este codigo..


Código:
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 11">
<link rel=File-List href="excel_SAR_archivos/filelist.xml">
<link rel=Edit-Time-Data href="excel_SAR_archivos/editdata.mso">
<link rel=OLE-Object-Data href="excel_SAR_archivos/oledata.mso">
<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:LastAuthor>oktopus</o:LastAuthor>
  <o:LastSaved>2009-05-28T02:26:24Z</o:LastSaved>
  <o:Version>11.9999</o:Version>
 </o:DocumentProperties>
</xml><![endif]-->
<style>
<!--table
 {mso-displayed-decimal-separator:"\,";
 mso-displayed-thousand-separator:"\.";}
@page
 {margin:.98in .79in .98in .79in;
 mso-header-margin:0in;
 mso-footer-margin:0in;}
tr
 {mso-height-source:auto;}
col
 {mso-width-source:auto;}
br
 {mso-data-placement:same-cell;}
.style0
 {mso-number-format:General;
 text-align:general;
 vertical-align:bottom;
 white-space:nowrap;
 mso-rotate:0;
 mso-background-source:auto;
 mso-pattern:auto;
 color:windowtext;
 font-size:10.0pt;
 font-weight:400;
 font-style:normal;
 text-decoration:none;
 font-family:Arial;
 mso-generic-font-family:auto;
 mso-font-charset:0;
 border:none;
 mso-protection:locked visible;
 mso-style-name:Normal;
 mso-style-id:0;}
td
 {mso-style-parent:style0;
 padding-top:1px;
 padding-right:1px;
 padding-left:1px;
 mso-ignore:padding;
 color:windowtext;
 font-size:10.0pt;
 font-weight:400;
 font-style:normal;
 text-decoration:none;
 font-family:Arial;
 mso-generic-font-family:auto;
 mso-font-charset:0;
 mso-number-format:General;
 text-align:general;
 vertical-align:bottom;
 border:none;
 mso-background-source:auto;
 mso-pattern:auto;
 mso-protection:locked visible;
 white-space:nowrap;
 mso-rotate:0;}
.xl24
 {mso-style-parent:style0;
 vertical-align:top;
 border:.5pt solid black;
 white-space:normal;}
.xl25
 {mso-style-parent:style0;
 font-weight:700;
 vertical-align:top;
 border:.5pt solid black;
 white-space:normal;}
.xl26
 {mso-style-parent:style0;
 text-align:center;
 vertical-align:top;
 border:.5pt solid black;
 white-space:normal;}
.xl27
 {mso-style-parent:style0;
 font-weight:700;
 text-align:center;
 vertical-align:top;
 border:.5pt solid black;
 white-space:normal;}
-->
</style>
<!--[if gte mso 9]><xml>
 <x:ExcelWorkbook>
  <x:ExcelWorksheets>
   <x:ExcelWorksheet>
    <x:Name>excel_productos</x:Name>
    <x:WorksheetOptions>
     <x:DefaultColWidth>10</x:DefaultColWidth>
     <x:Print>
      <x:ValidPrinterInfo/>
      <x:VerticalResolution>0</x:VerticalResolution>
     </x:Print>
     <x:Selected/>
     <x:Panes>
      <x:Pane>
       <x:Number>3</x:Number>
       <x:ActiveRow>4</x:ActiveRow>
       <x:RangeSelection>$5:$128</x:RangeSelection>
      </x:Pane>
     </x:Panes>
     <x:ProtectContents>False</x:ProtectContents>
     <x:ProtectObjects>False</x:ProtectObjects>
     <x:ProtectScenarios>False</x:ProtectScenarios>
    </x:WorksheetOptions>
   </x:ExcelWorksheet>
  </x:ExcelWorksheets>
  <x:WindowHeight>10005</x:WindowHeight>
  <x:WindowWidth>10005</x:WindowWidth>
  <x:WindowTopX>120</x:WindowTopX>
  <x:WindowTopY>135</x:WindowTopY>
  <x:ProtectStructure>False</x:ProtectStructure>
  <x:ProtectWindows>False</x:ProtectWindows>
 </x:ExcelWorkbook>
</xml><![endif]-->
</head>
<body link=blue vlink=purple>
<table x:str border=0 cellpadding=0 cellspacing=0 width=512 style='border-collapse:
 collapse;table-layout:fixed;width:384pt'>
 <col width=64 span=256 style='mso-width-source:userset;mso-width-alt:2340;
 width:48pt'>
 <tr height=20 style='mso-height-source:userset;height:15.0pt'>
  <td height=20 class=xl25 width=64 style='height:15.0pt;width:48pt'>CODIGO_SAR</td>
  <td class=xl25 width=64 style='border-left:none;width:48pt'>CODIGO_PROVEEDOR</td>
  <td class=xl27 width=64 style='border-left:none;width:48pt'>ID_UNIDAD</td>
  <td class=xl27 width=64 style='border-left:none;width:48pt'>UNIDAD</td>
  <td class=xl27 width=64 style='border-left:none;width:48pt'>ID_PRODUCTO</td>
  <td class=xl25 width=64 style='border-left:none;width:48pt'>NOMBRE_PRODUCTO</td>
  <td class=xl25 width=64 style='border-left:none;width:48pt'>PRECIO_PESOS</td>
  <td class=xl25 width=64 style='border-left:none;width:48pt'>PRECIO_DOLARES</td>
 </tr>
 <tr height=68 style='height:51.0pt'>
  <td height=68 class=xl24 align=right width=64 style='height:51.0pt;
  border-top:none;width:48pt' x:num>1010001</td>
  <td class=xl26 width=64 style='border-top:none;border-left:none;width:48pt'>-</td>
  <td class=xl26 width=64 style='border-top:none;border-left:none;width:48pt'
  x:num>2</td>
  <td class=xl24 width=64 style='border-top:none;border-left:none;width:48pt'>UNIDAD</td>
  <td class=xl26 width=64 style='border-top:none;border-left:none;width:48pt'
  x:num>1</td>
  <td class=xl24 width=64 style='border-top:none;border-left:none;width:48pt'>WT
  1 73PULG X 15 M ANSI 150</td>
  <td class=xl24 align=right width=64 style='border-top:none;border-left:none;
  width:48pt' x:num>0</td>
  <td class=xl24 align=right width=64 style='border-top:none;border-left:none;
  width:48pt' x:num>0</td>
 </tr>
 <tr height=68 style='height:51.0pt'>
  <td height=68 class=xl24 align=right width=64 style='height:51.0pt;
  border-top:none;width:48pt' x:num>1010002</td>
  <td class=xl26 width=64 style='border-top:none;border-left:none;width:48pt'>-</td>
  <td class=xl26 width=64 style='border-top:none;border-left:none;width:48pt'
  x:num>2</td>
  <td class=xl24 width=64 style='border-top:none;border-left:none;width:48pt'>UNIDAD</td>
  <td class=xl26 width=64 style='border-top:none;border-left:none;width:48pt'
  x:num>2</td>
  <td class=xl24 width=64 style='border-top:none;border-left:none;width:48pt'>WT
  2 ANSI 150 48PULG X 15'</td>
  <td class=xl24 align=right width=64 style='border-top:none;border-left:none;
  width:48pt' x:num>0</td>
  <td class=xl24 align=right width=64 style='border-top:none;border-left:none;
  width:48pt' x:num>0</td>
 </tr>
 <tr height=68 style='height:51.0pt'>
  <td height=68 class=xl24 align=right width=64 style='height:51.0pt;
  border-top:none;width:48pt' x:num>1010003</td>
  <td class=xl26 width=64 style='border-top:none;border-left:none;width:48pt'>-</td>
  <td class=xl26 width=64 style='border-top:none;border-left:none;width:48pt'
  x:num>2</td>
  <td class=xl24 width=64 style='border-top:none;border-left:none;width:48pt'>UNIDAD</td>
  <td class=xl26 width=64 style='border-top:none;border-left:none;width:48pt'
  x:num>3</td>
  <td class=xl24 width=64 style='border-top:none;border-left:none;width:48pt'>WT
  3 ANSI 600 42PULG X 10'</td>
  <td class=xl24 align=right width=64 style='border-top:none;border-left:none;
  width:48pt' x:num>0</td>
  <td class=xl24 align=right width=64 style='border-top:none;border-left:none;
  width:48pt' x:num>0</td>
 </tr>
 <![if supportMisalignedColumns]>
 <tr height=0 style='display:none'>
  <td width=64 style='width:48pt'></td>
  <td width=64 style='width:48pt'></td>
  <td width=64 style='width:48pt'></td>
  <td width=64 style='width:48pt'></td>
  <td width=64 style='width:48pt'></td>
  <td width=64 style='width:48pt'></td>
  <td width=64 style='width:48pt'></td>
  <td width=64 style='width:48pt'></td>
 </tr>
 <![endif]>
</table>
</body>
</html>
__________________
Control de Visitantes, Control de Accesos, Minutas digitales, Manejo de Correspondencia
http://www.controldevisitantes.com
  #9 (permalink)  
Antiguo 27/05/2009, 20:27
Avatar de lexus  
Fecha de Ingreso: enero-2002
Ubicación: Cali - Colombia
Mensajes: 2.234
Antigüedad: 23 ańos, 3 meses
Puntos: 4
Respuesta: leer un excel exportado desde asp.

al parecer si es un html.. ke podre hacer entonces para ke me cree un archivo de excel?
__________________
Control de Visitantes, Control de Accesos, Minutas digitales, Manejo de Correspondencia
http://www.controldevisitantes.com
  #10 (permalink)  
Antiguo 27/05/2009, 20:39
Avatar de AlZuwaga
Colaborador
 
Fecha de Ingreso: febrero-2001
Ubicación: 34.517 S, 58.500 O
Mensajes: 14.550
Antigüedad: 24 ańos, 2 meses
Puntos: 535
Respuesta: leer un excel exportado desde asp.

Esto es el mismo archivo que vos pasaste "guardado como" Libro de Microsoft Office Excel desde el excel 2003.

Cita:
ĐĎࡱá >  ţ˙     ţ˙˙˙ ţ˙˙˙  ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙   n ÍÁŔ  á  °Á  â \ p  Diego .... BLA BLA BLA
żViste que la extensión no es lo que cuenta? ;)
żCómo generar un archivo verdadero de excel?... no lo sé con certeza.
__________________
...___...
  #11 (permalink)  
Antiguo 27/05/2009, 21:12
Avatar de lexus  
Fecha de Ingreso: enero-2002
Ubicación: Cali - Colombia
Mensajes: 2.234
Antigüedad: 23 ańos, 3 meses
Puntos: 4
Respuesta: leer un excel exportado desde asp.

entonces mas bien como hago para leer ese archivo generado por el asp. sabes?

el resultado final del archivo .xls es este..


Código:
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 11">
<link rel=File-List href="excel_SAR_archivos/filelist.xml">
<link rel=Edit-Time-Data href="excel_SAR_archivos/editdata.mso">
<link rel=OLE-Object-Data href="excel_SAR_archivos/oledata.mso">
<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:LastAuthor>oktopus</o:LastAuthor>
  <o:LastSaved>2009-05-28T12:25:23Z</o:LastSaved>
  <o:Version>11.9999</o:Version>
 </o:DocumentProperties>
</xml><![endif]-->
<style>
<!--table
 {mso-displayed-decimal-separator:"\,";
 mso-displayed-thousand-separator:"\.";}
@page
 {margin:.98in .79in .98in .79in;
 mso-header-margin:0in;
 mso-footer-margin:0in;}
tr
 {mso-height-source:auto;}
col
 {mso-width-source:auto;}
br
 {mso-data-placement:same-cell;}
.style0
 {mso-number-format:General;
 text-align:general;
 vertical-align:bottom;
 white-space:nowrap;
 mso-rotate:0;
 mso-background-source:auto;
 mso-pattern:auto;
 color:windowtext;
 font-size:10.0pt;
 font-weight:400;
 font-style:normal;
 text-decoration:none;
 font-family:Arial;
 mso-generic-font-family:auto;
 mso-font-charset:0;
 border:none;
 mso-protection:locked visible;
 mso-style-name:Normal;
 mso-style-id:0;}
td
 {mso-style-parent:style0;
 padding-top:1px;
 padding-right:1px;
 padding-left:1px;
 mso-ignore:padding;
 color:windowtext;
 font-size:10.0pt;
 font-weight:400;
 font-style:normal;
 text-decoration:none;
 font-family:Arial;
 mso-generic-font-family:auto;
 mso-font-charset:0;
 mso-number-format:General;
 text-align:general;
 vertical-align:bottom;
 border:none;
 mso-background-source:auto;
 mso-pattern:auto;
 mso-protection:locked visible;
 white-space:nowrap;
 mso-rotate:0;}
.xl24
 {mso-style-parent:style0;
 vertical-align:top;
 border:.5pt solid black;
 white-space:normal;}
.xl25
 {mso-style-parent:style0;
 font-weight:700;
 vertical-align:top;
 border:.5pt solid black;
 white-space:normal;}
.xl26
 {mso-style-parent:style0;
 text-align:center;
 vertical-align:top;
 border:.5pt solid black;
 white-space:normal;}
.xl27
 {mso-style-parent:style0;
 font-weight:700;
 text-align:center;
 vertical-align:top;
 border:.5pt solid black;
 white-space:normal;}
-->
</style>
<!--[if gte mso 9]><xml>
 <x:ExcelWorkbook>
  <x:ExcelWorksheets>
   <x:ExcelWorksheet>
    <x:Name>excel_SAR</x:Name>
    <x:WorksheetOptions>
     <x:DefaultColWidth>10</x:DefaultColWidth>
     <x:Selected/>
     <x:DoNotDisplayGridlines/>
     <x:Panes>
      <x:Pane>
       <x:Number>3</x:Number>
       <x:ActiveRow>7</x:ActiveRow>
       <x:ActiveCol>7</x:ActiveCol>
      </x:Pane>
     </x:Panes>
     <x:ProtectContents>False</x:ProtectContents>
     <x:ProtectObjects>False</x:ProtectObjects>
     <x:ProtectScenarios>False</x:ProtectScenarios>
    </x:WorksheetOptions>
   </x:ExcelWorksheet>
  </x:ExcelWorksheets>
  <x:WindowHeight>9345</x:WindowHeight>
  <x:WindowWidth>18780</x:WindowWidth>
  <x:WindowTopX>240</x:WindowTopX>
  <x:WindowTopY>105</x:WindowTopY>
  <x:ProtectStructure>False</x:ProtectStructure>
  <x:ProtectWindows>False</x:ProtectWindows>
 </x:ExcelWorkbook>
</xml><![endif]-->
</head>
<body link=blue vlink=purple>
<table x:str border=0 cellpadding=0 cellspacing=0 width=1028 style='border-collapse:
 collapse;table-layout:fixed;width:772pt'>
 <col width=93 style='mso-width-source:userset;mso-width-alt:3401;width:70pt'>
 <col width=149 style='mso-width-source:userset;mso-width-alt:5449;width:112pt'>
 <col width=76 style='mso-width-source:userset;mso-width-alt:2779;width:57pt'>
 <col width=56 style='mso-width-source:userset;mso-width-alt:2048;width:42pt'>
 <col width=100 style='mso-width-source:userset;mso-width-alt:3657;width:75pt'>
 <col width=320 style='mso-width-source:userset;mso-width-alt:11702;width:240pt'>
 <col width=108 style='mso-width-source:userset;mso-width-alt:3949;width:81pt'>
 <col width=126 style='mso-width-source:userset;mso-width-alt:4608;width:95pt'>
 <tr height=20 style='mso-height-source:userset;height:15.0pt'>
  <td height=20 class=xl25 width=93 style='height:15.0pt;width:70pt'>CODIGO_SAR</td>
  <td class=xl25 width=149 style='border-left:none;width:112pt'>CODIGO_PROVEEDOR</td>
  <td class=xl27 width=76 style='border-left:none;width:57pt'>ID_UNIDAD</td>
  <td class=xl27 width=56 style='border-left:none;width:42pt'>UNIDAD</td>
  <td class=xl27 width=100 style='border-left:none;width:75pt'>ID_PRODUCTO</td>
  <td class=xl25 width=320 style='border-left:none;width:240pt'>NOMBRE_PRODUCTO</td>
  <td class=xl25 width=108 style='border-left:none;width:81pt'>PRECIO_PESOS</td>
  <td class=xl25 width=126 style='border-left:none;width:95pt'>PRECIO_DOLARES</td>
 </tr>
 <tr height=17 style='height:12.75pt'>
  <td height=17 class=xl24 align=right width=93 style='height:12.75pt;
  border-top:none;width:70pt' x:num>1010001</td>
  <td class=xl26 width=149 style='border-top:none;border-left:none;width:112pt'>-</td>
  <td class=xl26 width=76 style='border-top:none;border-left:none;width:57pt'
  x:num>2</td>
  <td class=xl24 width=56 style='border-top:none;border-left:none;width:42pt'>UNIDAD</td>
  <td class=xl26 width=100 style='border-top:none;border-left:none;width:75pt'
  x:num>1</td>
  <td class=xl24 width=320 style='border-top:none;border-left:none;width:240pt'>WT
  1 73PULG X 15 M ANSI 150</td>
  <td class=xl24 align=right width=108 style='border-top:none;border-left:none;
  width:81pt' x:num>5000</td>
  <td class=xl24 align=right width=126 style='border-top:none;border-left:none;
  width:95pt' x:num>5000</td>
 </tr>
 <tr height=17 style='height:12.75pt'>
  <td height=17 class=xl24 align=right width=93 style='height:12.75pt;
  border-top:none;width:70pt' x:num>1010002</td>
  <td class=xl26 width=149 style='border-top:none;border-left:none;width:112pt'>-</td>
  <td class=xl26 width=76 style='border-top:none;border-left:none;width:57pt'
  x:num>2</td>
  <td class=xl24 width=56 style='border-top:none;border-left:none;width:42pt'>UNIDAD</td>
  <td class=xl26 width=100 style='border-top:none;border-left:none;width:75pt'
  x:num>2</td>
  <td class=xl24 width=320 style='border-top:none;border-left:none;width:240pt'>WT
  2 ANSI 150 48PULG X 15'</td>
  <td class=xl24 align=right width=108 style='border-top:none;border-left:none;
  width:81pt' x:num>0</td>
  <td class=xl24 align=right width=126 style='border-top:none;border-left:none;
  width:95pt' x:num>0</td>
 </tr>
 <tr height=17 style='height:12.75pt'>
  <td height=17 class=xl24 align=right width=93 style='height:12.75pt;
  border-top:none;width:70pt' x:num>1010003</td>
  <td class=xl26 width=149 style='border-top:none;border-left:none;width:112pt'>-</td>
  <td class=xl26 width=76 style='border-top:none;border-left:none;width:57pt'
  x:num>2</td>
  <td class=xl24 width=56 style='border-top:none;border-left:none;width:42pt'>UNIDAD</td>
  <td class=xl26 width=100 style='border-top:none;border-left:none;width:75pt'
  x:num>3</td>
  <td class=xl24 width=320 style='border-top:none;border-left:none;width:240pt'>WT
  3 ANSI 600 42PULG X 10'</td>
  <td class=xl24 align=right width=108 style='border-top:none;border-left:none;
  width:81pt' x:num>0</td>
  <td class=xl24 align=right width=126 style='border-top:none;border-left:none;
  width:95pt' x:num>0</td>
 </tr>
 <tr height=17 style='height:12.75pt'>
  <td height=17 class=xl24 align=right width=93 style='height:12.75pt;
  border-top:none;width:70pt' x:num>1010004</td>
  <td class=xl26 width=149 style='border-top:none;border-left:none;width:112pt'>-</td>
  <td class=xl26 width=76 style='border-top:none;border-left:none;width:57pt'
  x:num>2</td>
  <td class=xl24 width=56 style='border-top:none;border-left:none;width:42pt'>UNIDAD</td>
  <td class=xl26 width=100 style='border-top:none;border-left:none;width:75pt'
  x:num>4</td>
  <td class=xl24 width=320 style='border-top:none;border-left:none;width:240pt'>WT
  4 ANSI 600 42PULG X 15'</td>
  <td class=xl24 align=right width=108 style='border-top:none;border-left:none;
  width:81pt' x:num>0</td>
  <td class=xl24 align=right width=126 style='border-top:none;border-left:none;
  width:95pt' x:num>0</td>
 </tr>
 <![if supportMisalignedColumns]>
 <tr height=0 style='display:none'>
  <td width=93 style='width:70pt'></td>
  <td width=149 style='width:112pt'></td>
  <td width=76 style='width:57pt'></td>
  <td width=56 style='width:42pt'></td>
  <td width=100 style='width:75pt'></td>
  <td width=320 style='width:240pt'></td>
  <td width=108 style='width:81pt'></td>
  <td width=126 style='width:95pt'></td>
 </tr>
 <![endif]>
</table>
</body>
</html>

sera que mas bien al hacer el upload con xelupload le cambio la extension a html o xml o algo asi y busco otra forma de leer el archivo? es decir ya dejo de leer un xls y tengo ke leer un html?
alguien sabe como leer un archivo asi con este formato?

gracias.
__________________
Control de Visitantes, Control de Accesos, Minutas digitales, Manejo de Correspondencia
http://www.controldevisitantes.com

Última edición por lexus; 28/05/2009 a las 06:26
  #12 (permalink)  
Antiguo 28/05/2009, 16:08
Avatar de lexus  
Fecha de Ingreso: enero-2002
Ubicación: Cali - Colombia
Mensajes: 2.234
Antigüedad: 23 ańos, 3 meses
Puntos: 4
Respuesta: leer un excel exportado desde asp.

alguein sabe como leer un html de esta forma desde asp?
__________________
Control de Visitantes, Control de Accesos, Minutas digitales, Manejo de Correspondencia
http://www.controldevisitantes.com
  #13 (permalink)  
Antiguo 29/05/2009, 09:16
Avatar de lexus  
Fecha de Ingreso: enero-2002
Ubicación: Cali - Colombia
Mensajes: 2.234
Antigüedad: 23 ańos, 3 meses
Puntos: 4
Respuesta: leer un excel exportado desde asp.

la estructura del archivo generado siempre seria la misma..
las columnas no cambiarian nunca lo unico que cambiaria seria la cantidad de filas que peuden ser mas o menos..
como podria llegar a leeer fila por fila de ese archivo para luego poder hacer lo que yo quiera con esa informacion como importarla a una bd.

alguien tiene idea de como leer un archivo con este formato y estas caracteristicas? obiamente podria tener cualqueir extension ya qeu yo controlo el upload y podria renombrarlo a la hora de subirlo en caso ke fuera necesario.
__________________
Control de Visitantes, Control de Accesos, Minutas digitales, Manejo de Correspondencia
http://www.controldevisitantes.com
  #14 (permalink)  
Antiguo 29/05/2009, 16:24
Avatar de a n g e l u s  
Fecha de Ingreso: enero-2006
Ubicación: Chile
Mensajes: 237
Antigüedad: 19 ańos, 3 meses
Puntos: 1
Respuesta: leer un excel exportado desde asp.

tengo la respuesta, a la noche te la envio porque me estan apurando para irme,

me parece que con esto conoci los foros del web, pero no cachachon como hacerlo.

la experiencia la experiencia.
__________________
Atte,
A n g e l u s
Concepción - Chile
más vale respuestas bien pensadas, que 7000 post
  #15 (permalink)  
Antiguo 29/05/2009, 16:30
Avatar de lexus  
Fecha de Ingreso: enero-2002
Ubicación: Cali - Colombia
Mensajes: 2.234
Antigüedad: 23 ańos, 3 meses
Puntos: 4
Respuesta: leer un excel exportado desde asp.

ok gracias kedo pendiente..
__________________
Control de Visitantes, Control de Accesos, Minutas digitales, Manejo de Correspondencia
http://www.controldevisitantes.com
  #16 (permalink)  
Antiguo 29/05/2009, 18:49
Avatar de Esfinge02  
Fecha de Ingreso: septiembre-2008
Ubicación: Cd. Victoria Tam
Mensajes: 162
Antigüedad: 16 ańos, 7 meses
Puntos: 2
Respuesta: leer un excel exportado desde asp.

buenas, diste la explicación por Privado?????? o aun no la han puesto..
__________________
La ignorancia es una bendición o un privilegio, yo lo siento programadores
  #17 (permalink)  
Antiguo 29/05/2009, 19:22
Avatar de Shiryu_Libra
Colaborador
 
Fecha de Ingreso: febrero-2007
Ubicación: Cantando "Screenager" en "Kirafa Kaput"
Mensajes: 3.614
Antigüedad: 18 ańos, 1 mes
Puntos: 88
Respuesta: leer un excel exportado desde asp.

Cita:
Iniciado por Esfinge02 Ver Mensaje
buenas, diste la explicación por Privado?????? o aun no la han puesto..
solo que no alcanzo a poner la respuesta por que salio de trabajo
__________________
"Eres parte del problema, parte de la solucion o parte del paisaje"
Un Saludo desde Desierto de Altar, Sonora, MX.
Shiryu_libra
  #18 (permalink)  
Antiguo 29/05/2009, 22:56
Avatar de a n g e l u s  
Fecha de Ingreso: enero-2006
Ubicación: Chile
Mensajes: 237
Antigüedad: 19 ańos, 3 meses
Puntos: 1
Primera parte genera excel

Después de muchas neuronas que se fueron y litros y litros de cafe supe que un excel generado por asp no se puede leer, porque, fácil para leer un asp debes definir el rango o la hoja pero que pasa si es dinamico, todo mal...

bueno como puedes manejar la forma en que generas la planilla excel puedes hacer lo siguiente:


PRIMERA PARTE GENERAL EXCEL

Bueno lo primero que tenemos que hacer es el encabezado que todos ya sabemos
Código PHP:
<%

        
Response.ContentType     "application/vnd.ms-excel" 
        
Response.AddHeader           "Content-Disposition""filename=guarde_con_numero_de_rut.xls;" 



%> 

luego generas la planilla.

la planilla esta compuesta por una tabla que la convierte en excel, pero aqui es donde esta la clave:

Código PHP:
<table name=inicio>
<
tr align="center" valign="middle" bgcolor="#FFFFFF" name="encabezado">
    <
td align="center" bgcolor="#FFFFCC" name="num">N&deg;</td>
    <
td align="center" bgcolor="#FFFFCC" name="id">nombre</td>
    <
td align="center" bgcolor="#FFFFCC" name="apellidos">apellidos</td>
    <
td align="center" bgcolor="#FFFFCC" name="nota">Nota</td>
</
tr
Si te fijas la etiqueta tr y td tiene un atributo que se llama name= que es uno de los atributo que una vez generado el archivo, el programa excel no lo elimina o altera.

luego viene tu consulta sql donde llenas la tabla con las filas:


Código PHP:
<%
sql2 "select idtrab, nombre, apellidos, nota"
...
do while 
not rst.eof
%>

<
tr align="center" valign="middle" bgcolor="#FFFFFF"  name="<%=rst("idtrab")%>">
    <
td align="center" name="numero"><%=k%></td>
    <
td align="center" name="nombre"><%=rst("nombre")%></td>
    <
td align="left" name="apellidos"><%=rst("apellidos")%></td>
    <
td align="left" name="nota"><%=rst("nota")%></td>
</
tr>

<%
rst.movenext
loop
%>

</
table name=fin
__________________
Atte,
A n g e l u s
Concepción - Chile
más vale respuestas bien pensadas, que 7000 post
  #19 (permalink)  
Antiguo 29/05/2009, 23:27
Avatar de a n g e l u s  
Fecha de Ingreso: enero-2006
Ubicación: Chile
Mensajes: 237
Antigüedad: 19 ańos, 3 meses
Puntos: 1
Recupera datos

RECUPERAR DATOS DEL EXCEL GENERADO POR ASP:

Código PHP:
<%
on error resume next
filename
=server.mappath("planillaexcelgeneradaconasp.xls")' aqui va la ruta del archivo que quieres cargar

Set fs = CreateObject("Scripting.FileSystemObject")
Set readfile=fs.OpenTextFile(filename,1,False)

    if err <> 0 then
        Response.Write("<hr>"&err.description&"<hr>")
        Response.End()
    end if

linea        = 0
contar      = 1
ver         = 0
guardafila     = ""
filas        = 0

Do while not readfile.atendofstream
    on error resume next
        if err <> 0 then
            Response.Write("ERROR : "&err.description)
                exit do
        else
'    
Text=readfile.skipline 'salta una linea
'    
Text=readfile.skip(74)' salta "n" numero de caracteres
    Text = readfile.readline '
lee la linea en donde quedo el cursor

'solo tomara los datos de la tabla y omite todo el resto que no sirve
 if CLng(InStr(Text, "name=encabezado>")) > 0 then'
---->limpia codigo para iniciar
    ver 
1
    Response
.Write("<table border=1>")
 
end if
 
 if 
CLng(InStr(Text"if supportMisalignedColumns]>")) > 0 then'---->limpia codigo para finalizar, aqui revisa codigos agrega excel para quitarlos
    ver = 0
    Response.Write("</table>")
 end if


if ver = 1 then'
-->IMPRIMIR EL CODIGO PARA VERLO COMO TABLA

    
if CLng(instr(Text,"<tr")) <> 0 then'-------> encuentra el ID del trabajador
                inicio_     = CLng(instr(Text,"name="))+5
                final_      = CLng(instr(Text,">"))
        
                variable     = MID(Text, inicio_, final_)
                trabajador    = replace(variable,">","")
                Response.Write("<hr>"&linea&".-"&filas&">"&trabajador)&"<br>"&vbCrLf
                
                    if filas > 0 then

                        sql2 = sql2 & " " & trabajador & ", "

                        if isnumeric(trabajador) then
                            Response.Write(sql2)&"<hr>"
                        end if
            
                    end if
                
                filas = filas + 1
    else

'
----- recuperacion nombre variable ---------------------------------------
        if 
CLng(instr(Text,"</td>")) <> 0 then'-------> no hay fin en la fila
            if guardafila = "" then'
-------> si no hay filas inconclusas continuo sin problemas
                inicio_     
CLng(instr(Text,"name="))+5
                final_      
CLng(instr(Text,"</td>"))
        
                
variable     MID(Textinicio_final_)
                
variable    replace(variable,"</td>","")
                
                
Response.Write(linea&"."&filas&".-"&variable)&"<br>"&vbCrLf
        
                guardafila 
""
            
else'-------> hay filas inconclusas pero hay fin asi que busco mi dato
                guardafila = guardafila&" "&Text
                inicio_     = CLng(instr(guardafila,"name="))+5
                final_      = CLng(instr(guardafila,"</td>"))-8
        
                variable     = MID(guardafila, inicio_, final_)
                variable    = replace(variable,"</td>","")

                Response.Write(linea&"."&filas&".-"&variable)&"<br>"&vbCrLf
                    
                guardafila = ""
            end if
        else'
-------> como no hay fin en la fila guardo la fila para buscar en la fila siguiente su fin
            guardafila 
guardafila&" "&Text
'            Response.Write(guardafila)&"<BR>"
        end if
'
----- recuperacion nombre variable ---------------------------------------
    
end if
end if

if 
ver 1 then'---> visualiza codigo
'        
Response.Write Textchr(13)
        
Response.Write(linea)&".-"Textchr(13)
end if


    
linea linea 1
        end 
if

loop
readfile
.close
set readfile
=nothing

set fs
=nothing



    end 
if

%> 


Espero haber ayudado con este código, si se puede mejorar lo agregan aca.
__________________
Atte,
A n g e l u s
Concepción - Chile
más vale respuestas bien pensadas, que 7000 post
  #20 (permalink)  
Antiguo 30/05/2009, 11:18
Avatar de lexus  
Fecha de Ingreso: enero-2002
Ubicación: Cali - Colombia
Mensajes: 2.234
Antigüedad: 23 ańos, 3 meses
Puntos: 4
Respuesta: leer un excel exportado desde asp.

Hola gracias por el codigo esta excelente

una preguntica..

mi objetivo con todo esto. es leer ese excel (tabla en html) e ir recorriendo fila por fila los datos para irlos importando a una base de datos..

ya probe tu codigo y me imprime en pantalla la tabla..
me gustaria saber si es posible separar o recorrer cada fila para yo ir almacenando cada celda en una variable y posteriormente en una bd.
__________________
Control de Visitantes, Control de Accesos, Minutas digitales, Manejo de Correspondencia
http://www.controldevisitantes.com
  #21 (permalink)  
Antiguo 30/05/2009, 11:19
Avatar de lexus  
Fecha de Ingreso: enero-2002
Ubicación: Cali - Colombia
Mensajes: 2.234
Antigüedad: 23 ańos, 3 meses
Puntos: 4
Respuesta: leer un excel exportado desde asp.

el codigo que se obtiene despues de exportar el excel desde asp. es este


Código HTML:
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 11">
<link rel=File-List href="excel_productos_archivos/filelist.xml">
<link rel=Edit-Time-Data href="excel_productos_archivos/editdata.mso">
<link rel=OLE-Object-Data href="excel_productos_archivos/oledata.mso">
<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:LastAuthor>oktopus</o:LastAuthor>
  <o:LastSaved>2009-05-30T17:17:31Z</o:LastSaved>
  <o:Version>11.9999</o:Version>
 </o:DocumentProperties>
</xml><![endif]-->
<style>
<!--table
 {mso-displayed-decimal-separator:"\,";
 mso-displayed-thousand-separator:"\.";}
@page
 {margin:.98in .79in .98in .79in;
 mso-header-margin:0in;
 mso-footer-margin:0in;}
tr
 {mso-height-source:auto;}
col
 {mso-width-source:auto;}
br
 {mso-data-placement:same-cell;}
.style0
 {mso-number-format:General;
 text-align:general;
 vertical-align:bottom;
 white-space:nowrap;
 mso-rotate:0;
 mso-background-source:auto;
 mso-pattern:auto;
 color:windowtext;
 font-size:10.0pt;
 font-weight:400;
 font-style:normal;
 text-decoration:none;
 font-family:Arial;
 mso-generic-font-family:auto;
 mso-font-charset:0;
 border:none;
 mso-protection:locked visible;
 mso-style-name:Normal;
 mso-style-id:0;}
td
 {mso-style-parent:style0;
 padding-top:1px;
 padding-right:1px;
 padding-left:1px;
 mso-ignore:padding;
 color:windowtext;
 font-size:10.0pt;
 font-weight:400;
 font-style:normal;
 text-decoration:none;
 font-family:Arial;
 mso-generic-font-family:auto;
 mso-font-charset:0;
 mso-number-format:General;
 text-align:general;
 vertical-align:bottom;
 border:none;
 mso-background-source:auto;
 mso-pattern:auto;
 mso-protection:locked visible;
 white-space:nowrap;
 mso-rotate:0;}
.xl24
 {mso-style-parent:style0;
 font-weight:700;
 vertical-align:top;
 border:.5pt solid black;
 white-space:normal;}
.xl25
 {mso-style-parent:style0;
 font-weight:700;
 vertical-align:top;
 border-top:.5pt solid black;
 border-right:.5pt solid black;
 border-bottom:.5pt solid black;
 border-left:none;
 white-space:normal;}
.xl26
 {mso-style-parent:style0;
 font-weight:700;
 text-align:center;
 vertical-align:top;
 border-top:.5pt solid black;
 border-right:.5pt solid black;
 border-bottom:.5pt solid black;
 border-left:none;
 white-space:normal;}
.xl27
 {mso-style-parent:style0;
 vertical-align:top;
 border-top:none;
 border-right:.5pt solid black;
 border-bottom:.5pt solid black;
 border-left:.5pt solid black;
 white-space:normal;}
.xl28
 {mso-style-parent:style0;
 text-align:center;
 vertical-align:top;
 border-top:none;
 border-right:.5pt solid black;
 border-bottom:.5pt solid black;
 border-left:none;
 white-space:normal;}
.xl29
 {mso-style-parent:style0;
 vertical-align:top;
 border-top:none;
 border-right:.5pt solid black;
 border-bottom:.5pt solid black;
 border-left:none;
 white-space:normal;}
.xl30
 {mso-style-parent:style0;
 text-align:right;
 vertical-align:top;
 border-top:none;
 border-right:.5pt solid black;
 border-bottom:.5pt solid black;
 border-left:none;
 white-space:normal;}
-->
</style>
<!--[if gte mso 9]><xml>
 <x:ExcelWorkbook>
  <x:ExcelWorksheets>
   <x:ExcelWorksheet>
    <x:Name>excel_SAR</x:Name>
    <x:WorksheetOptions>
     <x:DefaultColWidth>10</x:DefaultColWidth>
     <x:Selected/>
     <x:DoNotDisplayGridlines/>
     <x:LeftColumnVisible>3</x:LeftColumnVisible>
     <x:Panes>
      <x:Pane>
       <x:Number>3</x:Number>
       <x:ActiveRow>8</x:ActiveRow>
       <x:ActiveCol>4</x:ActiveCol>
      </x:Pane>
     </x:Panes>
     <x:ProtectContents>False</x:ProtectContents>
     <x:ProtectObjects>False</x:ProtectObjects>
     <x:ProtectScenarios>False</x:ProtectScenarios>
    </x:WorksheetOptions>
   </x:ExcelWorksheet>
  </x:ExcelWorksheets>
  <x:WindowHeight>9345</x:WindowHeight>
  <x:WindowWidth>18780</x:WindowWidth>
  <x:WindowTopX>240</x:WindowTopX>
  <x:WindowTopY>105</x:WindowTopY>
  <x:ProtectStructure>False</x:ProtectStructure>
  <x:ProtectWindows>False</x:ProtectWindows>
 </x:ExcelWorkbook>
</xml><![endif]-->
</head>
<body link=blue vlink=purple>
<table x:str border=0 cellpadding=0 cellspacing=0 width=1642 style='border-collapse:
 collapse;table-layout:fixed;width:1232pt' name=inicio>
 <col width=159 style='mso-width-source:userset;mso-width-alt:5814;width:119pt'>
 <col width=183 style='mso-width-source:userset;mso-width-alt:6692;width:137pt'>
 <col width=108 style='mso-width-source:userset;mso-width-alt:3949;width:81pt'>
 <col width=152 style='mso-width-source:userset;mso-width-alt:5558;width:114pt'>
 <col width=126 style='mso-width-source:userset;mso-width-alt:4608;width:95pt'>
 <col width=594 style='mso-width-source:userset;mso-width-alt:21723;width:446pt'>
 <col width=152 style='mso-width-source:userset;mso-width-alt:5558;width:114pt'>
 <col width=168 style='mso-width-source:userset;mso-width-alt:6144;width:126pt'>
 <tr height=20 style='mso-height-source:userset;height:15.0pt' name=encabezado>
  <td height=20 class=xl24 width=159 style='height:15.0pt;width:119pt'
  name="codigo_empresa">CODIGO_SAR</td>
  <td class=xl25 width=183 style='width:137pt' name="codigo_proveedor">CODIGO_PROVEEDOR</td>
  <td class=xl26 width=108 style='width:81pt' name="id_unidad">ID_UNIDAD</td>
  <td class=xl26 width=152 style='width:114pt' name=unidad>UNIDAD</td>
  <td class=xl26 width=126 style='width:95pt' name="id_producto">ID_PRODUCTO</td>
  <td class=xl25 width=594 style='width:446pt' name="nombre_producto">NOMBRE_PRODUCTO</td>
  <td class=xl25 width=152 style='width:114pt' name="precio_pesos">PRECIO_PESOS</td>
  <td class=xl25 width=168 style='width:126pt' name="precio_dolares">PRECIO_DOLARES</td>
 </tr>
 <tr height=20 style='mso-height-source:userset;height:15.0pt' name=1>
  <td height=20 class=xl27 align=right width=159 style='height:15.0pt;
  width:119pt' x:num name="codigo_empresa">1010001</td>
  <td class=xl28 width=183 style='width:137pt' name="codigo_proveedor">-</td>
  <td class=xl28 width=108 style='width:81pt' x:num name="id_unidad">2</td>
  <td class=xl28 width=152 style='width:114pt' name=unidad>UNIDAD</td>
  <td class=xl28 width=126 style='width:95pt' x:num name="id_producto">1</td>
  <td class=xl29 width=594 style='width:446pt' name="nombre_producto">WT 1
  73PULG X 15 M ANSI 150</td>
  <td class=xl30 width=152 style='width:114pt' x:num name="precio_pesos">500</td>
  <td class=xl30 width=168 style='width:126pt' x:num name="precio_dolares">1500</td>
 </tr>
 <tr height=20 style='mso-height-source:userset;height:15.0pt' name=2>
  <td height=20 class=xl27 align=right width=159 style='height:15.0pt;
  width:119pt' x:num name="codigo_empresa">1010002</td>
  <td class=xl28 width=183 style='width:137pt' name="codigo_proveedor">-</td>
  <td class=xl28 width=108 style='width:81pt' x:num name="id_unidad">2</td>
  <td class=xl28 width=152 style='width:114pt' name=unidad>UNIDAD</td>
  <td class=xl28 width=126 style='width:95pt' x:num name="id_producto">2</td>
  <td class=xl29 width=594 style='width:446pt' name="nombre_producto">WT 2 ANSI
  150 48PULG X 15'</td>
  <td class=xl30 width=152 style='width:114pt' x:num name="precio_pesos">0</td>
  <td class=xl30 width=168 style='width:126pt' x:num name="precio_dolares">0</td>
 </tr>
 <![if supportMisalignedColumns]>
 <tr height=0 style='display:none'>
  <td width=159 style='width:119pt'></td>
  <td width=183 style='width:137pt'></td>
  <td width=108 style='width:81pt'></td>
  <td width=152 style='width:114pt'></td>
  <td width=126 style='width:95pt'></td>
  <td width=594 style='width:446pt'></td>
  <td width=152 style='width:114pt'></td>
  <td width=168 style='width:126pt'></td>
 </tr> <![endif]></table></body></html>
 
 
 
__________________
Control de Visitantes, Control de Accesos, Minutas digitales, Manejo de Correspondencia
http://www.controldevisitantes.com
  #22 (permalink)  
Antiguo 30/05/2009, 11:20
Avatar de lexus  
Fecha de Ingreso: enero-2002
Ubicación: Cali - Colombia
Mensajes: 2.234
Antigüedad: 23 ańos, 3 meses
Puntos: 4
Respuesta: leer un excel exportado desde asp.

y el codigo que estoy usando lo modificque un poco porke me salian muchos datos innecsarios o numeros raros... y tambien el ultimo end if lo quite porque me salio un error de se esperaba un final de instruccion al parecer sobraba..

Código PHP:
 
on error resume next 
filename
=server.mappath("documentos/excel_productos.xls")' aqui va la ruta del archivo que quieres cargar 
Set fs = CreateObject("Scripting.FileSystemObject") 
Set readfile=fs.OpenTextFile(filename,1,False) 
    if err <> 0 then 
        Response.Write("<hr>"&err.description&"<hr>") 
        Response.End() 
    end if 
linea        = 0 
contar      = 1 
ver         =  0
guardafila     = "" 
filas        = 0 
Do while not readfile.atendofstream 
    on error resume next 
        if err <> 0 then 
            Response.Write("ERROR : "&err.description) 
                exit do 
        else 
'    
Text=readfile.skipline 'salta una linea 
'    
Text=readfile.skip(74)' salta "n" numero de caracteres 
    Text = readfile.readline '
lee la linea en donde quedo el cursor 
'solo tomara los datos de la tabla y omite todo el resto que no sirve 
 if CLng(InStr(Text, "name=encabezado>")) > 0 then'
---->limpia codigo para iniciar 
    ver 

    Response
.Write("<table border=1>"
 
end if 
 
 if 
CLng(InStr(Text"if supportMisalignedColumns]>")) > 0 then'---->limpia codigo para finalizar, aqui revisa codigos agrega excel para quitarlos 
    ver = 0 
    Response.Write("</table>") 
 end if 
 
if ver = 1 then'
-->IMPRIMIR EL CODIGO PARA VERLO COMO TABLA 
    
if CLng(instr(Text,"<tr")) <> 0 then'-------> encuentra el ID del trabajador 
                inicio_     = CLng(instr(Text,"name="))+5 
                final_      = CLng(instr(Text,">")) 
 
                variable     = MID(Text, inicio_, final_) 
                trabajador    = replace(variable,">","") 
               '
Response.Write("<hr>"&linea&".-"&filas&">"&trabajador)&"<br>"&vbCrLf 
 
                    
if filas 0 then 
                        sql2 
sql2 " " trabajador ", " 
                        
if isnumeric(trabajadorthen 
                        
'    Response.Write(sql2)&"<hr>" 
                        end if 
 
                    end if 
 
                filas = filas + 1 
    else 
'
----- recuperacion nombre variable --------------------------------------- 
        if 
CLng(instr(Text,"</td>")) <> 0 then'-------> no hay fin en la fila 
            if guardafila = "" then'
-------> si no hay filas inconclusas continuo sin problemas 
                inicio_     
CLng(instr(Text,"name="))+
                final_      
CLng(instr(Text,"</td>")) 
 
                
variable     MID(Textinicio_final_
                
variable    replace(variable,"</td>",""
 
 
 
                
guardafila "" 
            
else'-------> hay filas inconclusas pero hay fin asi que busco mi dato 
                guardafila = guardafila&" "&Text 
                inicio_     = CLng(instr(guardafila,"name="))+5 
                final_      = CLng(instr(guardafila,"</td>"))-8 
 
                variable     = MID(guardafila, inicio_, final_) 
                variable    = replace(variable,"</td>","") 
                '
Response.Write(linea&"."&filas&".-"&variable)&"<br>"&vbCrLf 
 
                guardafila 
"" 
            
end if 
        else
'-------> como no hay fin en la fila guardo la fila para buscar en la fila siguiente su fin 
            guardafila = guardafila&" "&Text 
   '
Response.Write(guardafila)&"<BR>" 
        
end if 
'----- recuperacion nombre variable --------------------------------------- 
    end if 
end if 
if ver = 1 then'
---> visualiza codigo 
        Response
.Write  Textchr(13
end if 
 
    
linea linea 
        end 
if 
loop 
readfile
.close 
set readfile
=nothing 
set fs
=nothing 

la verdad no necesito mostrar en pantalla la tabla simplemente manipular los datos para poder insertarlos uno a uno a una base de datos. sabes como hacerlo?
__________________
Control de Visitantes, Control de Accesos, Minutas digitales, Manejo de Correspondencia
http://www.controldevisitantes.com

Última edición por lexus; 30/05/2009 a las 14:01
  #23 (permalink)  
Antiguo 02/06/2009, 14:13
Avatar de lexus  
Fecha de Ingreso: enero-2002
Ubicación: Cali - Colombia
Mensajes: 2.234
Antigüedad: 23 ańos, 3 meses
Puntos: 4
Respuesta: leer un excel exportado desde asp.

alguien sabe como ahcer esto?
__________________
Control de Visitantes, Control de Accesos, Minutas digitales, Manejo de Correspondencia
http://www.controldevisitantes.com
  #24 (permalink)  
Antiguo 05/06/2009, 16:33
Avatar de a n g e l u s  
Fecha de Ingreso: enero-2006
Ubicación: Chile
Mensajes: 237
Antigüedad: 19 ańos, 3 meses
Puntos: 1
Respuesta: leer un excel exportado desde asp.

hola, retomo la respuesta para complementarla.


este es el excel


Código PHP:
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">

<
head>
<
meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<
meta name=ProgId content=Excel.Sheet>
<
meta name=Generator content="Microsoft Excel 11">
<
link rel=File-List href="76005200-0_archivos/filelist.xml">
<
link rel=Edit-Time-Data href="76005200-0_archivos/editdata.mso">
<
link rel=OLE-Object-Data href="76005200-0_archivos/oledata.mso">
<!--[if 
gte mso 9]><xml>
 <
o:DocumentProperties>
  <
o:LastAuthor>WinuE</o:LastAuthor>
  <
o:LastSaved>2009-06-05T22:44:30Z</o:LastSaved>
  <
o:Version>11.9999</o:Version>
 </
o:DocumentProperties>
 <
o:OfficeDocumentSettings>
  <
o:DownloadComponents/>
  <
o:LocationOfComponents HRef="/"/>
 </
o:OfficeDocumentSettings>
</
xml><![endif]-->
<
style>
<!--
table
    
{mso-displayed-decimal-separator:"\,";
    
mso-displayed-thousand-separator:"\.";}
@
page
    
{margin:.98in .79in .98in .79in;
    
mso-header-margin:0in;
    
mso-footer-margin:0in;}
tr
    
{mso-height-source:auto;}
col
    
{mso-width-source:auto;}
br
    
{mso-data-placement:same-cell;}
.
style0
    
{mso-number-format:General;
    
text-align:general;
    
vertical-align:bottom;
    
white-space:nowrap;
    
mso-rotate:0;
    
mso-background-source:auto;
    
mso-pattern:auto;
    
color:windowtext;
    
font-size:10.0pt;
    
font-weight:400;
    
font-style:normal;
    
text-decoration:none;
    
font-family:Arial;
    
mso-generic-font-family:auto;
    
mso-font-charset:0;
    
border:none;
    
mso-protection:locked visible;
    
mso-style-name:Normal;
    
mso-style-id:0;}
td
    
{mso-style-parent:style0;
    
padding-top:1px;
    
padding-right:1px;
    
padding-left:1px;
    
mso-ignore:padding;
    
color:windowtext;
    
font-size:10.0pt;
    
font-weight:400;
    
font-style:normal;
    
text-decoration:none;
    
font-family:Arial;
    
mso-generic-font-family:auto;
    
mso-font-charset:0;
    
mso-number-format:General;
    
text-align:general;
    
vertical-align:bottom;
    
border:none;
    
mso-background-source:auto;
    
mso-pattern:auto;
    
mso-protection:locked visible;
    
white-space:nowrap;
    
mso-rotate:0;}
.
xl24
    
{mso-style-parent:style0;
    
text-align:center;
    
background:white;
    
mso-pattern:auto none;}
.
xl25
    
{mso-style-parent:style0;
    
text-align:center;
    
border:.5pt solid black;
    
background:#FFFFCC;
    
mso-pattern:auto none;
    
white-space:normal;}
.
xl26
    
{mso-style-parent:style0;
    
text-align:center;
    
border-top:.5pt solid black;
    
border-right:.5pt solid black;
    
border-bottom:.5pt solid black;
    
border-left:none;
    
background:#FFFFCC;
    
mso-pattern:auto none;
    
white-space:normal;}
.
xl27
    
{mso-style-parent:style0;
    
text-align:center;
    
border-top:.5pt solid black;
    
border-right:.5pt solid black;
    
border-bottom:.5pt solid black;
    
border-left:none;
    
background:white;
    
mso-pattern:auto none;
    
white-space:normal;}
.
xl28
    
{mso-style-parent:style0;
    
text-align:center;
    
border-top:.5pt solid black;
    
border-right:.5pt solid black;
    
border-bottom:.5pt solid black;
    
border-left:none;
    
background:#CCFFFF;
    
mso-pattern:auto none;
    
white-space:normal;}
.
xl29
    
{mso-style-parent:style0;
    
text-align:center;
    
border-top:.5pt solid black;
    
border-right:.5pt solid black;
    
border-bottom:.5pt solid black;
    
border-left:none;
    
background:#CCCCFF;
    
mso-pattern:auto none;
    
white-space:normal;}
.
xl30
    
{mso-style-parent:style0;
    
text-align:center;
    
border-top:.5pt solid black;
    
border-right:.5pt solid black;
    
border-bottom:.5pt solid black;
    
border-left:none;
    
background:#FFFF99;
    
mso-pattern:auto none;
    
white-space:normal;}
.
xl31
    
{mso-style-parent:style0;
    
text-align:center;
    
border-top:.5pt solid black;
    
border-right:.5pt solid black;
    
border-bottom:.5pt solid black;
    
border-left:none;
    
background:#FFCC99;
    
mso-pattern:auto none;
    
white-space:normal;}
.
xl32
    
{mso-style-parent:style0;
    
text-align:center;
    
border-top:.5pt solid black;
    
border-right:.5pt solid black;
    
border-bottom:.5pt solid black;
    
border-left:none;
    
background:#CCFFCC;
    
mso-pattern:auto none;
    
white-space:normal;}
.
xl33
    
{mso-style-parent:style0;
    
text-align:center;
    
border-top:.5pt solid black;
    
border-right:.5pt solid black;
    
border-bottom:.5pt solid black;
    
border-left:none;
    
background:#FF99CC;
    
mso-pattern:auto none;
    
white-space:normal;}
.
xl34
    
{mso-style-parent:style0;
    
text-align:center;
    
border-top:none;
    
border-right:.5pt solid black;
    
border-bottom:.5pt solid black;
    
border-left:.5pt solid black;
    
background:#FFFFCC;
    
mso-pattern:auto none;
    
white-space:normal;}
.
xl35
    
{mso-style-parent:style0;
    
text-align:center;
    
border-top:none;
    
border-right:.5pt solid black;
    
border-bottom:.5pt solid black;
    
border-left:none;
    
background:#FFFFCC;
    
mso-pattern:auto none;
    
white-space:normal;}
.
xl36
    
{mso-style-parent:style0;
    
text-align:left;
    
border-top:none;
    
border-right:.5pt solid black;
    
border-bottom:.5pt solid black;
    
border-left:none;
    
background:#FFFFCC;
    
mso-pattern:auto none;
    
white-space:normal;}
.
xl37
    
{mso-style-parent:style0;
    
mso-number-format:"Short Date";
    
text-align:center;
    
border-top:none;
    
border-right:.5pt solid black;
    
border-bottom:.5pt solid black;
    
border-left:none;
    
background:#FFFFCC;
    
mso-pattern:auto none;
    
white-space:normal;}
.
xl38
    
{mso-style-parent:style0;
    
mso-number-format:"\#\,\#\#0";
    
text-align:center;
    
border-top:none;
    
border-right:.5pt solid black;
    
border-bottom:.5pt solid black;
    
border-left:none;
    
background:#FFFFCC;
    
mso-pattern:auto none;
    
white-space:normal;}
.
xl39
    
{mso-style-parent:style0;
    
text-align:center;
    
border-top:none;
    
border-right:.5pt solid black;
    
border-bottom:.5pt solid black;
    
border-left:none;
    
background:white;
    
mso-pattern:auto none;
    
white-space:normal;}
.
xl40
    
{mso-style-parent:style0;
    
text-align:center;
    
border-top:none;
    
border-right:.5pt solid black;
    
border-bottom:.5pt solid black;
    
border-left:none;
    
background:#CCFFFF;
    
mso-pattern:auto none;
    
white-space:normal;}
.
xl41
    
{mso-style-parent:style0;
    
text-align:center;
    
border-top:none;
    
border-right:.5pt solid black;
    
border-bottom:.5pt solid black;
    
border-left:none;
    
background:#CCCCFF;
    
mso-pattern:auto none;
    
white-space:normal;}
.
xl42
    
{mso-style-parent:style0;
    
text-align:center;
    
border-top:none;
    
border-right:.5pt solid black;
    
border-bottom:.5pt solid black;
    
border-left:none;
    
background:#FFFF99;
    
mso-pattern:auto none;
    
white-space:normal;}
.
xl43
    
{mso-style-parent:style0;
    
text-align:center;
    
border-top:none;
    
border-right:.5pt solid black;
    
border-bottom:.5pt solid black;
    
border-left:none;
    
background:#FFCC99;
    
mso-pattern:auto none;
    
white-space:normal;}
.
xl44
    
{mso-style-parent:style0;
    
text-align:center;
    
border-top:none;
    
border-right:.5pt solid black;
    
border-bottom:.5pt solid black;
    
border-left:none;
    
background:#CCFFCC;
    
mso-pattern:auto none;
    
white-space:normal;}
-->
</
style>
<!--[if 
gte mso 9]><xml>
 <
x:ExcelWorkbook>
  <
x:ExcelWorksheets>
   <
x:ExcelWorksheet>
    <
x:Name>76005200-0</x:Name>
    <
x:WorksheetOptions>
     <
x:DefaultColWidth>10</x:DefaultColWidth>
     <
x:Selected/>
     <
x:DoNotDisplayGridlines/>
     <
x:ProtectContents>False</x:ProtectContents>
     <
x:ProtectObjects>False</x:ProtectObjects>
     <
x:ProtectScenarios>False</x:ProtectScenarios>
    </
x:WorksheetOptions>
   </
x:ExcelWorksheet>
  </
x:ExcelWorksheets>
  <
x:WindowHeight>12270</x:WindowHeight>
  <
x:WindowWidth>23595</x:WindowWidth>
  <
x:WindowTopX>600</x:WindowTopX>
  <
x:WindowTopY>45</x:WindowTopY>
  <
x:ProtectStructure>False</x:ProtectStructure>
  <
x:ProtectWindows>False</x:ProtectWindows>
 </
x:ExcelWorkbook>
</
xml><![endif]-->
</
head
__________________
Atte,
A n g e l u s
Concepción - Chile
más vale respuestas bien pensadas, que 7000 post

Última edición por a n g e l u s; 05/06/2009 a las 16:47
  #25 (permalink)  
Antiguo 05/06/2009, 16:48
Avatar de a n g e l u s  
Fecha de Ingreso: enero-2006
Ubicación: Chile
Mensajes: 237
Antigüedad: 19 ańos, 3 meses
Puntos: 1
Respuesta: leer un excel exportado desde asp.

Código PHP:
<body link=blue vlink=purple>

<
table x:str border=0 cellpadding=0 cellspacing=0 width=7192 style='border-collapse:
 collapse;table-layout:fixed;width:5400pt' 
name=trabajadores>
 <
col width=21 style='mso-width-source:userset;mso-width-alt:768;width:16pt'>
 <
col width=82 style='mso-width-source:userset;mso-width-alt:2998;width:62pt'>
 <
col width=72 style='mso-width-source:userset;mso-width-alt:2633;width:54pt'>
 <
col width=55 style='mso-width-source:userset;mso-width-alt:2011;width:41pt'>
 <
col width=135 style='mso-width-source:userset;mso-width-alt:4937;width:101pt'>
 <
col width=102 style='mso-width-source:userset;mso-width-alt:3730;width:77pt'>
 <
col width=202 style='mso-width-source:userset;mso-width-alt:7387;width:152pt'>
 <
col width=107 style='mso-width-source:userset;mso-width-alt:3913;width:80pt'>
 <
col width=134 style='mso-width-source:userset;mso-width-alt:4900;width:101pt'>
 <
col width=158 style='mso-width-source:userset;mso-width-alt:5778;width:119pt'>
 <
col width=132 style='mso-width-source:userset;mso-width-alt:4827;width:99pt'>
 <
col width=189 style='mso-width-source:userset;mso-width-alt:6912;width:142pt'>
 <
col width=155 style='mso-width-source:userset;mso-width-alt:5668;width:116pt'>
 <
col width=81 style='mso-width-source:userset;mso-width-alt:2962;width:61pt'>
 <
col width=175 style='mso-width-source:userset;mso-width-alt:6400;width:131pt'>
 <
col width=179 style='mso-width-source:userset;mso-width-alt:6546;width:134pt'>
 <
col width=120 style='mso-width-source:userset;mso-width-alt:4388;width:90pt'>
 <
col width=113 style='mso-width-source:userset;mso-width-alt:4132;width:85pt'>
 <
col width=85 style='mso-width-source:userset;mso-width-alt:3108;width:64pt'>
 <
col width=113 style='mso-width-source:userset;mso-width-alt:4132;width:85pt'>
 <
col width=137 style='mso-width-source:userset;mso-width-alt:5010;width:103pt'>
 <
col width=142 style='mso-width-source:userset;mso-width-alt:5193;width:107pt'>
 <
col width=151 style='mso-width-source:userset;mso-width-alt:5522;width:113pt'>
 <
col width=150 style='mso-width-source:userset;mso-width-alt:5485;width:113pt'>
 <
col width=158 style='mso-width-source:userset;mso-width-alt:5778;width:119pt'>
 <
col width=147 style='mso-width-source:userset;mso-width-alt:5376;width:110pt'>
 <
col width=156 style='mso-width-source:userset;mso-width-alt:5705;width:117pt'>
 <
col width=235 style='mso-width-source:userset;mso-width-alt:8594;width:176pt'>
 <
col width=208 style='mso-width-source:userset;mso-width-alt:7606;width:156pt'>
 <
col width=279 style='mso-width-source:userset;mso-width-alt:10203;width:209pt'>
 <
col width=252 style='mso-width-source:userset;mso-width-alt:9216;width:189pt'>
 <
col width=225 style='mso-width-source:userset;mso-width-alt:8228;width:169pt'>
 <
col width=245 style='mso-width-source:userset;mso-width-alt:8960;width:184pt'>
 <
col width=174 style='mso-width-source:userset;mso-width-alt:6363;width:131pt'>
 <
col width=206 style='mso-width-source:userset;mso-width-alt:7533;width:155pt'>
 <
col width=63 style='mso-width-source:userset;mso-width-alt:2304;width:47pt'>
 <
col width=116 style='mso-width-source:userset;mso-width-alt:4242;width:87pt'>
 <
col width=107 style='mso-width-source:userset;mso-width-alt:3913;width:80pt'>
 <
col width=34 style='mso-width-source:userset;mso-width-alt:1243;width:26pt'>
 <
col width=131 style='mso-width-source:userset;mso-width-alt:4790;width:98pt'>
 <
col width=200 style='mso-width-source:userset;mso-width-alt:7314;width:150pt'>
 <
col width=84 style='mso-width-source:userset;mso-width-alt:3072;width:63pt'>
 <
col width=67 style='mso-width-source:userset;mso-width-alt:2450;width:50pt'>
 <
col width=106 style='mso-width-source:userset;mso-width-alt:3876;width:80pt'>
 <
col width=141 style='mso-width-source:userset;mso-width-alt:5156;width:106pt'>
 <
col width=97 style='mso-width-source:userset;mso-width-alt:3547;width:73pt'>
 <
col width=194 style='mso-width-source:userset;mso-width-alt:7094;width:146pt'>
 <
col width=117 style='mso-width-source:userset;mso-width-alt:4278;width:88pt'>
 <
col width=96 style='mso-width-source:userset;mso-width-alt:3510;width:72pt'>
 <
col width=109 style='mso-width-source:userset;mso-width-alt:3986;width:82pt'>
 <
col width=119 style='mso-width-source:userset;mso-width-alt:4352;width:89pt'>
 <
col width=136 style='mso-width-source:userset;mso-width-alt:4973;width:102pt'>
 <
tr class=xl24 height=17 style='height:12.75pt' name=encabezado>
  <
td height=17 class=xl25 width=21 style='height:12.75pt;width:16pt'
  
name=numero></td>
  <
td class=xl26 width=82 style='width:62pt' name=rut>Rut</td>
  <
td class=xl26 width=72 style='width:54pt' name=paterno>Paterno</td>
  <
td class=xl26 width=55 style='width:41pt' name=materno>Materno</td>
  <
td class=xl26 width=135 style='width:101pt' name=nombre>Nombre</td>
  <
td class=xl26 width=102 style='width:77pt' name=tipocontrato>Tipo de
  Contrato
</td>
  <
td class=xl26 width=202 style='width:152pt' name=cargo>Cargo</td>
  <
td class=xl26 width=107 style='width:80pt' name=ingreso>Fecha de Ingreso</td>
  <
td class=xl26 width=134 style='width:101pt' name=basepactado>Sueldo Base
  Pactado
</td>
  <
td class=xl27 width=158 style='width:119pt' name=basepagado>Sueldo Pagado en
  el Mes
</td>
  <
td class=xl26 width=132 style='width:99pt' name=gratificacionpactada>Gratificación
  Pactada
</td>
  <
td class=xl27 width=189 style='width:142pt' name=gratificacionpagada>Gratificación
  pagada en el mes
</td>
  <
td class=xl28 width=155 style='width:116pt' name=diastrabajados>Días
  Trabajados pagados
</td>
  <
td class=xl28 width=81 style='width:61pt' name=diaslicencia>Días licencia</td>
  <
td class=xl29 width=175 style='width:131pt' name=sintperdido>Accidente Sin
  tiempo pedido
</td>
  <
td class=xl29 width=179 style='width:134pt' name=contperdido>Accidente Con
  tiempo pedido
</td>
  <
td class=xl29 width=120 style='width:90pt' name=trayecto>Accidente Trayecto</td>
  <
td class=xl29 width=113 style='width:85pt' name=fatales>Accidente Fatales</td>
  <
td class=xl28 width=85 style='width:64pt' name=diaspermiso>Días Permiso</td>
  <
td class=xl28 width=113 style='width:85pt' name=diasinjustificados>Días
  injustificados
</td>
  <
td class=xl28 width=137 style='width:103pt' name=diasreales>Días reales
  trabajados
</td>
  <
td class=xl30 width=142 style='width:107pt' name=hrsextras50>Total Hrs Extas
  al 50
%</td>
  <
td class=xl31 width=151 style='width:113pt' name=pagohrs50>Valor pagado hrs
  al 50
%</td>
  <
td class=xl30 width=150 style='width:113pt' name=hrsextras100>Total Hrs
  Extas al 100
%</td>
  <
td class=xl31 width=158 style='width:119pt' name=pagohrs100>Valor pagado hrs
  al 100
%</td>
  <
td class=xl30 width=147 style='width:110pt' name=hrsextrasotro>Total Hrs
  Extas a otro
%</td>
  <
td class=xl31 width=156 style='width:117pt' name=pagohrsotro>Valor pagado
  hrs a otro
%</td>
  <
td class=xl32 width=235 style='width:176pt' name=223.3>Requerir
  Cantidad
&nbsp;Bono de Produccion</td>
  <
td class=xl32 width=208 style='width:156pt' name=223.3>H.VARIABLE Bono de
  Produccion
</td>
  <
td class=xl32 width=279 style='width:209pt' name=1796.3>Requerir
  Cantidad
&nbsp;Bono ProducciĂłn Cosecha</td>
  <
td class=xl32 width=252 style='width:189pt' name=1796.3>H.VARIABLE Bono
  ProducciĂłn Cosecha
</td>
  <
td class=xl32 width=225 style='width:169pt' name=232.2>ASIGNACION
  AsignaciĂłn ColaciĂłn
</td>
  <
td class=xl32 width=245 style='width:184pt' name=253.2>ASIGNACION
  AsignaciĂłn MovilizaciĂłn
</td>
  <
td class=xl32 width=174 style='width:131pt' name=ncargas>Número de cargas
  familiares
</td>
  <
td class=xl32 width=206 style='width:155pt' name=pagocargas>Total Pagado en
  cargas familiares
</td>
  <
td class=xl28 width=63 style='width:47pt' name=afp>AFP</td>
  <
td class=xl28 width=116 style='width:87pt' name=pagoafp>Valor Pagado AFP</td>
  <
td class=xl28 width=107 style='width:80pt' name=ahorrovoluntario>Ahorro
  Voluntario
</td>
  <
td class=xl28 width=34 style='width:26pt' name=apv>APV</td>
  <
td class=xl28 width=131 style='width:98pt' name=cotizacionvoluntaria>Cotización
  Voluntaria
</td>
  <
td class=xl28 width=200 style='width:150pt' name=segurocesantia>Valor pagado
  seguro de cesantía
</td>
  <
td class=xl30 width=84 style='width:63pt' name=salud>Salud</td>
  <
td class=xl30 width=67 style='width:50pt' name=valorplan>Valor Plan</td>
  <
td class=xl30 width=106 style='width:80pt' name=formapagoplan>Forma pago
  Plan
</td>
  <
td class=xl30 width=141 style='width:106pt' name=pagoensalud>Valor Pagado en
  Salud
</td>
  <
td class=xl30 width=97 style='width:73pt' name=impuestounico>Impuesto Único</td>
  <
td class=xl31 width=194 style='width:146pt' name=126.8>Obligatorios
  RetenciĂłn Judicial
</td>
  <
td class=xl27 width=117 style='width:88pt' name=anticipo>Anticipo de Sueldo</td>
  <
td class=xl33 width=96 style='width:72pt' name=finiquito>Fecha Finiquito</td>
  <
td class=xl33 width=109 style='width:82pt' name=avisoprevio>Total Aviso
  Previo
</td>
  <
td class=xl33 width=119 style='width:89pt' name=anoservicio>Total Ańos
  Servicio
</td>
  <
td class=xl33 width=136 style='width:102pt' name=feriado>Total Feriado
  Finiquito
</td>
 </
tr
__________________
Atte,
A n g e l u s
Concepción - Chile
más vale respuestas bien pensadas, que 7000 post
  #26 (permalink)  
Antiguo 05/06/2009, 16:49
Avatar de a n g e l u s  
Fecha de Ingreso: enero-2006
Ubicación: Chile
Mensajes: 237
Antigüedad: 19 ańos, 3 meses
Puntos: 1
Respuesta: leer un excel exportado desde asp.

Código PHP:
 <tr class=xl24 height=17 style='height:12.75pt' name=3232>
  <
td height=17 class=xl34 width=21 style='height:12.75pt;width:16pt' x:num
  name
=numero>1</td>
  <
td class=xl35 width=82 style='width:62pt' name=rut>11.111.111-1</td>
  <
td class=xl36 width=72 style='width:54pt' name=paterno>Loyola</td>
  <
td class=xl36 width=55 style='width:41pt' name=materno>Núńez</td>
  <
td class=xl36 width=135 style='width:101pt' name=nombre>Rodrigo</td>
  <
td class=xl35 width=102 style='width:77pt' name=tipocontrato>Indefinido</td>
  <
td class=xl35 width=202 style='width:152pt' name=cargo>Jefe Informatica</td>
  <
td class=xl37 width=107 style='width:80pt' x:num="39335" name=ingreso>10-09-2007</td>
  <
td class=xl38 width=134 style='width:101pt' x:num="280000" name=basepactado>280.000</td>
  <
td class=xl39 width=158 style='width:119pt' x:num name=basepagado>523452</td>
  <
td class=xl35 width=132 style='width:99pt' name=gratificacionpactada>&nbsp;</td>
  <
td class=xl39 width=189 style='width:142pt' x:num x:fmla="=10*10"
  
name=gratificacionpagada>100</td>
  <
td class=xl40 width=155 style='width:116pt' x:num x:fmla="=L2*2"
  
name=diastrabajados>200</td>
  <
td class=xl40 width=81 style='width:61pt' x:num name=diaslicencia>0</td>
  <
td class=xl41 width=175 style='width:131pt' x:num name=sintperdido>0</td>
  <
td class=xl41 width=179 style='width:134pt' x:num name=contperdido>0</td>
  <
td class=xl41 width=120 style='width:90pt' x:num name=trayecto>0</td>
  <
td class=xl41 width=113 style='width:85pt' x:num name=fatales>0</td>
  <
td class=xl40 width=85 style='width:64pt' x:num name=diaspermiso>0</td>
  <
td class=xl40 width=113 style='width:85pt' x:num name=diasinjustificados>0</td>
  <
td class=xl40 width=137 style='width:103pt' x:num name=diasreales>0</td>
  <
td class=xl42 width=142 style='width:107pt' x:num name=hrsextras50>0</td>
  <
td class=xl43 width=151 style='width:113pt' x:num name=pagohrs50>0</td>
  <
td class=xl42 width=150 style='width:113pt' x:num name=hrsextras100>0</td>
  <
td class=xl43 width=158 style='width:119pt' x:num name=pagohrs100>0</td>
  <
td class=xl42 width=147 style='width:110pt' x:num name=hrsextrasotro>0</td>
  <
td class=xl43 width=156 style='width:117pt' x:num name=pagohrsotro>0</td>
  <
td class=xl44 width=235 style='width:176pt' x:num name=variable>0</td>
  <
td class=xl44 width=208 style='width:156pt' x:num name=variable>0</td>
  <
td class=xl44 width=279 style='width:209pt' x:num name=variable>0</td>
  <
td class=xl44 width=252 style='width:189pt' x:num name=variable>0</td>
  <
td class=xl44 width=225 style='width:169pt' x:num name=asignacion>0</td>
  <
td class=xl44 width=245 style='width:184pt' x:num name=asignacion>0</td>
  <
td class=xl44 width=174 style='width:131pt' x:num name=ncargas>0</td>
  <
td class=xl44 width=206 style='width:155pt' x:num name=pagocargas>0</td>
  <
td class=xl40 width=63 style='width:47pt' name=afp>Habitat</td>
  <
td class=xl40 width=116 style='width:87pt' x:num name=pagoafp>0</td>
  <
td class=xl40 width=107 style='width:80pt' x:num name=ahorrovoluntario>0</td>
  <
td class=xl40 width=34 style='width:26pt' x:num name=apv>0</td>
  <
td class=xl40 width=131 style='width:98pt' x:num name=cotizacionvoluntaria>0</td>
  <
td class=xl40 width=200 style='width:150pt' x:num name=segurocesantia>0</td>
  <
td class=xl42 width=84 style='width:63pt' name=salud>MASVIDA</td>
  <
td class=xl42 width=67 style='width:50pt' x:num name=valorplan>7</td>
  <
td class=xl42 width=106 style='width:80pt' name=formapagoplan>Porcentaje</td>
  <
td class=xl42 width=141 style='width:106pt' x:num name=pagoensalud>0</td>
  <
td class=xl42 width=97 style='width:73pt' x:num name=impuestounico>0</td>
  <
td class=xl43 width=194 style='width:146pt' x:num name=obligatorio>0</td>
  <
td class=xl39 width=117 style='width:88pt' x:num name=anticipo>0</td>
  <
td class=xl35 width=96 style='width:72pt' name=finiquito>00/00/0000</td>
  <
td class=xl35 width=109 style='width:82pt' x:num name=avisoprevio>0</td>
  <
td class=xl35 width=119 style='width:89pt' x:num name=anoservicio>0</td>
  <
td class=xl35 width=136 style='width:102pt' x:num name=feriado>0</td>
 </
tr
__________________
Atte,
A n g e l u s
Concepción - Chile
más vale respuestas bien pensadas, que 7000 post
  #27 (permalink)  
Antiguo 05/06/2009, 16:51
Avatar de a n g e l u s  
Fecha de Ingreso: enero-2006
Ubicación: Chile
Mensajes: 237
Antigüedad: 19 ańos, 3 meses
Puntos: 1
Respuesta: leer un excel exportado desde asp.

Código PHP:
 <tr class=xl24 height=17 style='height:12.75pt' name=7350>
  <
td height=17 class=xl34 width=21 style='height:12.75pt;width:16pt' x:num
  name
=numero>2</td>
  <
td class=xl35 width=82 style='width:62pt' name=rut>22.222.222-2</td>
  <
td class=xl36 width=72 style='width:54pt' name=paterno>Oettinger</td>
  <
td class=xl36 width=55 style='width:41pt' name=materno>Daniel</td>
  <
td class=xl36 width=135 style='width:101pt' name=nombre>Carlos</td>
  <
td class=xl35 width=102 style='width:77pt' name=tipocontrato>Indefinido</td>
  <
td class=xl35 width=202 style='width:152pt' name=cargo>Motosierrista</td>
  <
td class=xl37 width=107 style='width:80pt' x:num="39589" name=ingreso>21-05-2008</td>
  <
td class=xl38 width=134 style='width:101pt' x:num="50000" name=basepactado>50.000</td>
  <
td class=xl39 width=158 style='width:119pt' x:num name=basepagado>523452</td>
  <
td class=xl35 width=132 style='width:99pt' name=gratificacionpactada>Mensual
  25
%</td>
  <
td class=xl39 width=189 style='width:142pt' x:num name=gratificacionpagada>5234523</td>
  <
td class=xl40 width=155 style='width:116pt' x:num name=diastrabajados>0</td>
  <
td class=xl40 width=81 style='width:61pt' x:num name=diaslicencia>0</td>
  <
td class=xl41 width=175 style='width:131pt' x:num name=sintperdido>0</td>
  <
td class=xl41 width=179 style='width:134pt' x:num name=contperdido>0</td>
  <
td class=xl41 width=120 style='width:90pt' x:num name=trayecto>0</td>
  <
td class=xl41 width=113 style='width:85pt' x:num name=fatales>0</td>
  <
td class=xl40 width=85 style='width:64pt' x:num name=diaspermiso>0</td>
  <
td class=xl40 width=113 style='width:85pt' x:num name=diasinjustificados>0</td>
  <
td class=xl40 width=137 style='width:103pt' x:num name=diasreales>0</td>
  <
td class=xl42 width=142 style='width:107pt' x:num name=hrsextras50>0</td>
  <
td class=xl43 width=151 style='width:113pt' x:num name=pagohrs50>0</td>
  <
td class=xl42 width=150 style='width:113pt' x:num name=hrsextras100>0</td>
  <
td class=xl43 width=158 style='width:119pt' x:num name=pagohrs100>0</td>
  <
td class=xl42 width=147 style='width:110pt' x:num name=hrsextrasotro>0</td>
  <
td class=xl43 width=156 style='width:117pt' x:num name=pagohrsotro>0</td>
  <
td class=xl44 width=235 style='width:176pt' x:num name=variable>0</td>
  <
td class=xl44 width=208 style='width:156pt' x:num name=variable>0</td>
  <
td class=xl44 width=279 style='width:209pt' x:num name=variable>0</td>
  <
td class=xl44 width=252 style='width:189pt' x:num name=variable>0</td>
  <
td class=xl44 width=225 style='width:169pt' x:num name=asignacion>0</td>
  <
td class=xl44 width=245 style='width:184pt' x:num name=asignacion>0</td>
  <
td class=xl44 width=174 style='width:131pt' x:num name=ncargas>1</td>
  <
td class=xl44 width=206 style='width:155pt' x:num name=pagocargas>0</td>
  <
td class=xl40 width=63 style='width:47pt' name=afp>Capital</td>
  <
td class=xl40 width=116 style='width:87pt' x:num name=pagoafp>0</td>
  <
td class=xl40 width=107 style='width:80pt' x:num name=ahorrovoluntario>0</td>
  <
td class=xl40 width=34 style='width:26pt' x:num name=apv>0</td>
  <
td class=xl40 width=131 style='width:98pt' x:num name=cotizacionvoluntaria>0</td>
  <
td class=xl40 width=200 style='width:150pt' x:num name=segurocesantia>0</td>
  <
td class=xl42 width=84 style='width:63pt' name=salud>BANMEDICA</td>
  <
td class=xl42 width=67 style='width:50pt' x:num name=valorplan>7</td>
  <
td class=xl42 width=106 style='width:80pt' name=formapagoplan>Porcentaje</td>
  <
td class=xl42 width=141 style='width:106pt' x:num name=pagoensalud>0</td>
  <
td class=xl42 width=97 style='width:73pt' x:num name=impuestounico>0</td>
  <
td class=xl43 width=194 style='width:146pt' x:num name=obligatorio>0</td>
  <
td class=xl39 width=117 style='width:88pt' x:num name=anticipo>0</td>
  <
td class=xl35 width=96 style='width:72pt' name=finiquito>00/00/0000</td>
  <
td class=xl35 width=109 style='width:82pt' x:num name=avisoprevio>0</td>
  <
td class=xl35 width=119 style='width:89pt' x:num name=anoservicio>0</td>
  <
td class=xl35 width=136 style='width:102pt' x:num name=feriado>0</td>
 </
tr>
 <
tr class=xl24 height=17 style='height:12.75pt' name=3230>
  <
td height=17 class=xl34 width=21 style='height:12.75pt;width:16pt' x:num
  name
=numero>3</td>
  <
td class=xl35 width=82 style='width:62pt' name=rut>33.333.333-3</td>
  <
td class=xl36 width=72 style='width:54pt' name=paterno>Provoste</td>
  <
td class=xl36 width=55 style='width:41pt' name=materno>Somoza</td>
  <
td class=xl36 width=135 style='width:101pt' name=nombre>Patricio</td>
  <
td class=xl35 width=102 style='width:77pt' name=tipocontrato>Indefinido</td>
  <
td class=xl35 width=202 style='width:152pt' name=cargo>Auditora</td>
  <
td class=xl37 width=107 style='width:80pt' x:num="39406" name=ingreso>20-11-2007</td>
  <
td class=xl38 width=134 style='width:101pt' x:num="200000" name=basepactado>200.000</td>
  <
td class=xl39 width=158 style='width:119pt' x:num name=basepagado>523452</td>
  <
td class=xl35 width=132 style='width:99pt' name=gratificacionpactada>&nbsp;</td>
  <
td class=xl39 width=189 style='width:142pt' x:num name=gratificacionpagada>5234523</td>
  <
td class=xl40 width=155 style='width:116pt' x:num name=diastrabajados>0</td>
  <
td class=xl40 width=81 style='width:61pt' x:num name=diaslicencia>0</td>
  <
td class=xl41 width=175 style='width:131pt' x:num name=sintperdido>0</td>
  <
td class=xl41 width=179 style='width:134pt' x:num name=contperdido>0</td>
  <
td class=xl41 width=120 style='width:90pt' x:num name=trayecto>0</td>
  <
td class=xl41 width=113 style='width:85pt' x:num name=fatales>0</td>
  <
td class=xl40 width=85 style='width:64pt' x:num name=diaspermiso>0</td>
  <
td class=xl40 width=113 style='width:85pt' x:num name=diasinjustificados>0</td>
  <
td class=xl40 width=137 style='width:103pt' x:num name=diasreales>0</td>
  <
td class=xl42 width=142 style='width:107pt' x:num name=hrsextras50>0</td>
  <
td class=xl43 width=151 style='width:113pt' x:num name=pagohrs50>0</td>
  <
td class=xl42 width=150 style='width:113pt' x:num name=hrsextras100>0</td>
  <
td class=xl43 width=158 style='width:119pt' x:num name=pagohrs100>0</td>
  <
td class=xl42 width=147 style='width:110pt' x:num name=hrsextrasotro>0</td>
  <
td class=xl43 width=156 style='width:117pt' x:num name=pagohrsotro>0</td>
  <
td class=xl44 width=235 style='width:176pt' x:num name=variable>0</td>
  <
td class=xl44 width=208 style='width:156pt' x:num name=variable>0</td>
  <
td class=xl44 width=279 style='width:209pt' x:num name=variable>0</td>
  <
td class=xl44 width=252 style='width:189pt' x:num name=variable>0</td>
  <
td class=xl44 width=225 style='width:169pt' x:num name=asignacion>0</td>
  <
td class=xl44 width=245 style='width:184pt' x:num name=asignacion>0</td>
  <
td class=xl44 width=174 style='width:131pt' x:num name=ncargas>0</td>
  <
td class=xl44 width=206 style='width:155pt' x:num name=pagocargas>0</td>
  <
td class=xl40 width=63 style='width:47pt' name=afp>Provida</td>
  <
td class=xl40 width=116 style='width:87pt' x:num name=pagoafp>0</td>
  <
td class=xl40 width=107 style='width:80pt' x:num name=ahorrovoluntario>0</td>
  <
td class=xl40 width=34 style='width:26pt' x:num name=apv>0</td>
  <
td class=xl40 width=131 style='width:98pt' x:num name=cotizacionvoluntaria>0</td>
  <
td class=xl40 width=200 style='width:150pt' x:num name=segurocesantia>0</td>
  <
td class=xl42 width=84 style='width:63pt' name=salud>CONSALUD</td>
  <
td class=xl42 width=67 style='width:50pt' x:num name=valorplan>7</td>
  <
td class=xl42 width=106 style='width:80pt' name=formapagoplan>Porcentaje</td>
  <
td class=xl42 width=141 style='width:106pt' x:num name=pagoensalud>0</td>
  <
td class=xl42 width=97 style='width:73pt' x:num name=impuestounico>0</td>
  <
td class=xl43 width=194 style='width:146pt' x:num name=obligatorio>0</td>
  <
td class=xl39 width=117 style='width:88pt' x:num name=anticipo>0</td>
  <
td class=xl35 width=96 style='width:72pt' name=finiquito>00/00/0000</td>
  <
td class=xl35 width=109 style='width:82pt' x:num name=avisoprevio>0</td>
  <
td class=xl35 width=119 style='width:89pt' x:num name=anoservicio>0</td>
  <
td class=xl35 width=136 style='width:102pt' x:num name=feriado>0</td>
 </
tr
__________________
Atte,
A n g e l u s
Concepción - Chile
más vale respuestas bien pensadas, que 7000 post
  #28 (permalink)  
Antiguo 05/06/2009, 16:53
Avatar de a n g e l u s  
Fecha de Ingreso: enero-2006
Ubicación: Chile
Mensajes: 237
Antigüedad: 19 ańos, 3 meses
Puntos: 1
Respuesta: leer un excel exportado desde asp.

Código PHP:
<tr class=xl24 height=17 style='height:12.75pt' name=3231>
  <
td height=17 class=xl34 width=21 style='height:12.75pt;width:16pt' x:num
  name
=numero>4</td>
  <
td class=xl35 width=82 style='width:62pt' name=rut>13.141.710-1</td>
  <
td class=xl36 width=72 style='width:54pt' name=paterno>Montana</td>
  <
td class=xl36 width=55 style='width:41pt' name=materno>haana</td>
  <
td class=xl36 width=135 style='width:101pt' name=nombre>sara</td>
  <
td class=xl35 width=102 style='width:77pt' name=tipocontrato>Indefinido</td>
  <
td class=xl35 width=202 style='width:152pt' name=cargo>Auditora</td>
  <
td class=xl37 width=107 style='width:80pt' x:num="39365" name=ingreso>10-10-2007</td>
  <
td class=xl38 width=134 style='width:101pt' x:num="200000" name=basepactado>200.000</td>
  <
td class=xl39 width=158 style='width:119pt' x:num name=basepagado>523452</td>
  <
td class=xl35 width=132 style='width:99pt' name=gratificacionpactada>&nbsp;</td>
  <
td class=xl39 width=189 style='width:142pt' x:num name=gratificacionpagada>5234523</td>
  <
td class=xl40 width=155 style='width:116pt' x:num name=diastrabajados>0</td>
  <
td class=xl40 width=81 style='width:61pt' x:num name=diaslicencia>0</td>
  <
td class=xl41 width=175 style='width:131pt' x:num name=sintperdido>0</td>
  <
td class=xl41 width=179 style='width:134pt' x:num name=contperdido>0</td>
  <
td class=xl41 width=120 style='width:90pt' x:num name=trayecto>0</td>
  <
td class=xl41 width=113 style='width:85pt' x:num name=fatales>0</td>
  <
td class=xl40 width=85 style='width:64pt' x:num name=diaspermiso>0</td>
  <
td class=xl40 width=113 style='width:85pt' x:num name=diasinjustificados>0</td>
  <
td class=xl40 width=137 style='width:103pt' x:num name=diasreales>0</td>
  <
td class=xl42 width=142 style='width:107pt' x:num name=hrsextras50>0</td>
  <
td class=xl43 width=151 style='width:113pt' x:num name=pagohrs50>0</td>
  <
td class=xl42 width=150 style='width:113pt' x:num name=hrsextras100>0</td>
  <
td class=xl43 width=158 style='width:119pt' x:num name=pagohrs100>0</td>
  <
td class=xl42 width=147 style='width:110pt' x:num name=hrsextrasotro>0</td>
  <
td class=xl43 width=156 style='width:117pt' x:num name=pagohrsotro>0</td>
  <
td class=xl44 width=235 style='width:176pt' x:num name=variable>0</td>
  <
td class=xl44 width=208 style='width:156pt' x:num name=variable>0</td>
  <
td class=xl44 width=279 style='width:209pt' x:num name=variable>0</td>
  <
td class=xl44 width=252 style='width:189pt' x:num name=variable>0</td>
  <
td class=xl44 width=225 style='width:169pt' x:num name=asignacion>0</td>
  <
td class=xl44 width=245 style='width:184pt' x:num name=asignacion>0</td>
  <
td class=xl44 width=174 style='width:131pt' x:num name=ncargas>0</td>
  <
td class=xl44 width=206 style='width:155pt' x:num name=pagocargas>0</td>
  <
td class=xl40 width=63 style='width:47pt' name=afp>Plan Vital</td>
  <
td class=xl40 width=116 style='width:87pt' x:num name=pagoafp>0</td>
  <
td class=xl40 width=107 style='width:80pt' x:num name=ahorrovoluntario>0</td>
  <
td class=xl40 width=34 style='width:26pt' x:num name=apv>0</td>
  <
td class=xl40 width=131 style='width:98pt' x:num name=cotizacionvoluntaria>0</td>
  <
td class=xl40 width=200 style='width:150pt' x:num name=segurocesantia>0</td>
  <
td class=xl42 width=84 style='width:63pt' name=salud>FONASA</td>
  <
td class=xl42 width=67 style='width:50pt' x:num name=valorplan>7</td>
  <
td class=xl42 width=106 style='width:80pt' name=formapagoplan>Porcentaje</td>
  <
td class=xl42 width=141 style='width:106pt' x:num name=pagoensalud>0</td>
  <
td class=xl42 width=97 style='width:73pt' x:num name=impuestounico>0</td>
  <
td class=xl43 width=194 style='width:146pt' x:num name=obligatorio>0</td>
  <
td class=xl39 width=117 style='width:88pt' x:num name=anticipo>0</td>
  <
td class=xl35 width=96 style='width:72pt' name=finiquito>00/00/0000</td>
  <
td class=xl35 width=109 style='width:82pt' x:num name=avisoprevio>0</td>
  <
td class=xl35 width=119 style='width:89pt' x:num name=anoservicio>0</td>
  <
td class=xl35 width=136 style='width:102pt' x:num name=feriado>0</td>
 </
tr>


 <
tr class=xl24 height=17 style='height:12.75pt' name=3229>
  <
td height=17 class=xl34 width=21 style='height:12.75pt;width:16pt' x:num
  name
=numero>5</td>
  <
td class=xl35 width=82 style='width:62pt' name=rut>15.671.105-5</td>
  <
td class=xl36 width=72 style='width:54pt' name=paterno>Santibańez</td>
  <
td class=xl36 width=55 style='width:41pt' name=materno>Acuńa</td>
  <
td class=xl36 width=135 style='width:101pt' name=nombre>Sergio</td>
  <
td class=xl35 width=102 style='width:77pt' name=tipocontrato>Indefinido</td>
  <
td class=xl35 width=202 style='width:152pt' name=cargo>Auditor</td>
  <
td class=xl37 width=107 style='width:80pt' x:num="39406" name=ingreso>20-11-2007</td>
  <
td class=xl38 width=134 style='width:101pt' x:num="200000" name=basepactado>200.000</td>
  <
td class=xl39 width=158 style='width:119pt' x:num name=basepagado>523452</td>
  <
td class=xl35 width=132 style='width:99pt' name=gratificacionpactada>&nbsp;</td>
  <
td class=xl39 width=189 style='width:142pt' x:num name=gratificacionpagada>5234523</td>
  <
td class=xl40 width=155 style='width:116pt' x:num name=diastrabajados>0</td>
  <
td class=xl40 width=81 style='width:61pt' x:num name=diaslicencia>0</td>
  <
td class=xl41 width=175 style='width:131pt' x:num name=sintperdido>0</td>
  <
td class=xl41 width=179 style='width:134pt' x:num name=contperdido>0</td>
  <
td class=xl41 width=120 style='width:90pt' x:num name=trayecto>0</td>
  <
td class=xl41 width=113 style='width:85pt' x:num name=fatales>0</td>
  <
td class=xl40 width=85 style='width:64pt' x:num name=diaspermiso>0</td>
  <
td class=xl40 width=113 style='width:85pt' x:num name=diasinjustificados>0</td>
  <
td class=xl40 width=137 style='width:103pt' x:num name=diasreales>0</td>
  <
td class=xl42 width=142 style='width:107pt' x:num name=hrsextras50>0</td>
  <
td class=xl43 width=151 style='width:113pt' x:num name=pagohrs50>0</td>
  <
td class=xl42 width=150 style='width:113pt' x:num name=hrsextras100>0</td>
  <
td class=xl43 width=158 style='width:119pt' x:num name=pagohrs100>0</td>
  <
td class=xl42 width=147 style='width:110pt' x:num name=hrsextrasotro>0</td>
  <
td class=xl43 width=156 style='width:117pt' x:num name=pagohrsotro>0</td>
  <
td class=xl44 width=235 style='width:176pt' x:num name=variable>0</td>
  <
td class=xl44 width=208 style='width:156pt' x:num name=variable>0</td>
  <
td class=xl44 width=279 style='width:209pt' x:num name=variable>0</td>
  <
td class=xl44 width=252 style='width:189pt' x:num name=variable>0</td>
  <
td class=xl44 width=225 style='width:169pt' x:num name=asignacion>0</td>
  <
td class=xl44 width=245 style='width:184pt' x:num name=asignacion>0</td>
  <
td class=xl44 width=174 style='width:131pt' x:num name=ncargas>0</td>
  <
td class=xl44 width=206 style='width:155pt' x:num name=pagocargas>0</td>
  <
td class=xl40 width=63 style='width:47pt' name=afp>Habitat</td>
  <
td class=xl40 width=116 style='width:87pt' x:num name=pagoafp>0</td>
  <
td class=xl40 width=107 style='width:80pt' x:num name=ahorrovoluntario>0</td>
  <
td class=xl40 width=34 style='width:26pt' x:num name=apv>0</td>
  <
td class=xl40 width=131 style='width:98pt' x:num name=cotizacionvoluntaria>0</td>
  <
td class=xl40 width=200 style='width:150pt' x:num name=segurocesantia>0</td>
  <
td class=xl42 width=84 style='width:63pt' name=salud>FONASA</td>
  <
td class=xl42 width=67 style='width:50pt' x:num name=valorplan>7</td>
  <
td class=xl42 width=106 style='width:80pt' name=formapagoplan>Porcentaje</td>
  <
td class=xl42 width=141 style='width:106pt' x:num name=pagoensalud>0</td>
  <
td class=xl42 width=97 style='width:73pt' x:num name=impuestounico>0</td>
  <
td class=xl43 width=194 style='width:146pt' x:num name=obligatorio>0</td>
  <
td class=xl39 width=117 style='width:88pt' x:num name=anticipo>0</td>
  <
td class=xl35 width=96 style='width:72pt' name=finiquito>00/00/0000</td>
  <
td class=xl35 width=109 style='width:82pt' x:num name=avisoprevio>0</td>
  <
td class=xl35 width=119 style='width:89pt' x:num name=anoservicio>0</td>
  <
td class=xl35 width=136 style='width:102pt' x:num name=feriado>0</td>
 </
tr
__________________
Atte,
A n g e l u s
Concepción - Chile
más vale respuestas bien pensadas, que 7000 post
  #29 (permalink)  
Antiguo 05/06/2009, 16:54
Avatar de a n g e l u s  
Fecha de Ingreso: enero-2006
Ubicación: Chile
Mensajes: 237
Antigüedad: 19 ańos, 3 meses
Puntos: 1
Respuesta: leer un excel exportado desde asp.

Código PHP:
 <tr class=xl24 height=17 style='height:12.75pt' name=9128>
  <
td height=17 class=xl34 width=21 style='height:12.75pt;width:16pt' x:num
  name
=numero>6</td>
  <
td class=xl35 width=82 style='width:62pt' name=rut>99.999.999-9</td>
  <
td class=xl36 width=72 style='width:54pt' name=paterno>santana</td>
  <
td class=xl36 width=55 style='width:41pt' name=materno>buoso</td>
  <
td class=xl36 width=135 style='width:101pt' name=nombre>cristian</td>
  <
td class=xl35 width=102 style='width:77pt' name=tipocontrato>Indefinido</td>
  <
td class=xl35 width=202 style='width:152pt' name=cargo>Encargado Central De
  Transporte
</td>
  <
td class=xl37 width=107 style='width:80pt' x:num="39601" name=ingreso>02-06-2008</td>
  <
td class=xl35 width=134 style='width:101pt' x:num name=basepactado>2</td>
  <
td class=xl39 width=158 style='width:119pt' x:num name=basepagado>523452</td>
  <
td class=xl35 width=132 style='width:99pt' name=gratificacionpactada>Mensual
  25
%</td>
  <
td class=xl39 width=189 style='width:142pt' x:num name=gratificacionpagada>5234523</td>
  <
td class=xl40 width=155 style='width:116pt' x:num name=diastrabajados>0</td>
  <
td class=xl40 width=81 style='width:61pt' x:num name=diaslicencia>0</td>
  <
td class=xl41 width=175 style='width:131pt' x:num name=sintperdido>0</td>
  <
td class=xl41 width=179 style='width:134pt' x:num name=contperdido>0</td>
  <
td class=xl41 width=120 style='width:90pt' x:num name=trayecto>0</td>
  <
td class=xl41 width=113 style='width:85pt' x:num name=fatales>0</td>
  <
td class=xl40 width=85 style='width:64pt' x:num name=diaspermiso>0</td>
  <
td class=xl40 width=113 style='width:85pt' x:num name=diasinjustificados>0</td>
  <
td class=xl40 width=137 style='width:103pt' x:num name=diasreales>0</td>
  <
td class=xl42 width=142 style='width:107pt' x:num name=hrsextras50>0</td>
  <
td class=xl43 width=151 style='width:113pt' x:num name=pagohrs50>0</td>
  <
td class=xl42 width=150 style='width:113pt' x:num name=hrsextras100>0</td>
  <
td class=xl43 width=158 style='width:119pt' x:num name=pagohrs100>0</td>
  <
td class=xl42 width=147 style='width:110pt' x:num name=hrsextrasotro>0</td>
  <
td class=xl43 width=156 style='width:117pt' x:num name=pagohrsotro>0</td>
  <
td class=xl44 width=235 style='width:176pt' x:num name=variable>0</td>
  <
td class=xl44 width=208 style='width:156pt' x:num name=variable>0</td>
  <
td class=xl44 width=279 style='width:209pt' x:num name=variable>0</td>
  <
td class=xl44 width=252 style='width:189pt' x:num name=variable>0</td>
  <
td class=xl44 width=225 style='width:169pt' x:num name=asignacion>0</td>
  <
td class=xl44 width=245 style='width:184pt' x:num name=asignacion>0</td>
  <
td class=xl44 width=174 style='width:131pt' x:num name=ncargas>3</td>
  <
td class=xl44 width=206 style='width:155pt' x:num name=pagocargas>0</td>
  <
td class=xl40 width=63 style='width:47pt' name=afp>Habitat</td>
  <
td class=xl40 width=116 style='width:87pt' x:num name=pagoafp>0</td>
  <
td class=xl40 width=107 style='width:80pt' x:num name=ahorrovoluntario>0</td>
  <
td class=xl40 width=34 style='width:26pt' x:num name=apv>0</td>
  <
td class=xl40 width=131 style='width:98pt' x:num name=cotizacionvoluntaria>0</td>
  <
td class=xl40 width=200 style='width:150pt' x:num name=segurocesantia>0</td>
  <
td class=xl42 width=84 style='width:63pt' name=salud>FONASA</td>
  <
td class=xl42 width=67 style='width:50pt' x:num name=valorplan>7</td>
  <
td class=xl42 width=106 style='width:80pt' name=formapagoplan>Porcentaje</td>
  <
td class=xl42 width=141 style='width:106pt' x:num name=pagoensalud>0</td>
  <
td class=xl42 width=97 style='width:73pt' x:num name=impuestounico>0</td>
  <
td class=xl43 width=194 style='width:146pt' x:num name=obligatorio>0</td>
  <
td class=xl39 width=117 style='width:88pt' x:num name=anticipo>0</td>
  <
td class=xl35 width=96 style='width:72pt' name=finiquito>00/00/0000</td>
  <
td class=xl35 width=109 style='width:82pt' x:num name=avisoprevio>0</td>
  <
td class=xl35 width=119 style='width:89pt' x:num name=anoservicio>0</td>
  <
td class=xl35 width=136 style='width:102pt' x:num name=feriado>0</td>
 </
tr>
 <![if 
supportMisalignedColumns]>


 <
tr height=0 style='display:none'>
  <
td width=21 style='width:16pt'></td>
  <
td width=82 style='width:62pt'></td>
  <
td width=72 style='width:54pt'></td>
  <
td width=55 style='width:41pt'></td>
  <
td width=135 style='width:101pt'></td>
  <
td width=102 style='width:77pt'></td>
  <
td width=202 style='width:152pt'></td>
  <
td width=107 style='width:80pt'></td>
  <
td width=134 style='width:101pt'></td>
  <
td width=158 style='width:119pt'></td>
  <
td width=132 style='width:99pt'></td>
  <
td width=189 style='width:142pt'></td>
  <
td width=155 style='width:116pt'></td>
  <
td width=81 style='width:61pt'></td>
  <
td width=175 style='width:131pt'></td>
  <
td width=179 style='width:134pt'></td>
  <
td width=120 style='width:90pt'></td>
  <
td width=113 style='width:85pt'></td>
  <
td width=85 style='width:64pt'></td>
  <
td width=113 style='width:85pt'></td>
  <
td width=137 style='width:103pt'></td>
  <
td width=142 style='width:107pt'></td>
  <
td width=151 style='width:113pt'></td>
  <
td width=150 style='width:113pt'></td>
  <
td width=158 style='width:119pt'></td>
  <
td width=147 style='width:110pt'></td>
  <
td width=156 style='width:117pt'></td>
  <
td width=235 style='width:176pt'></td>
  <
td width=208 style='width:156pt'></td>
  <
td width=279 style='width:209pt'></td>
  <
td width=252 style='width:189pt'></td>
  <
td width=225 style='width:169pt'></td>
  <
td width=245 style='width:184pt'></td>
  <
td width=174 style='width:131pt'></td>
  <
td width=206 style='width:155pt'></td>
  <
td width=63 style='width:47pt'></td>
  <
td width=116 style='width:87pt'></td>
  <
td width=107 style='width:80pt'></td>
  <
td width=34 style='width:26pt'></td>
  <
td width=131 style='width:98pt'></td>
  <
td width=200 style='width:150pt'></td>
  <
td width=84 style='width:63pt'></td>
  <
td width=67 style='width:50pt'></td>
  <
td width=106 style='width:80pt'></td>
  <
td width=141 style='width:106pt'></td>
  <
td width=97 style='width:73pt'></td>
  <
td width=194 style='width:146pt'></td>
  <
td width=117 style='width:88pt'></td>
  <
td width=96 style='width:72pt'></td>
  <
td width=109 style='width:82pt'></td>
  <
td width=119 style='width:89pt'></td>
  <
td width=136 style='width:102pt'></td>
 </
tr>
 <![endif]>
</
table>

</
body>

</
html
__________________
Atte,
A n g e l u s
Concepción - Chile
más vale respuestas bien pensadas, que 7000 post
  #30 (permalink)  
Antiguo 05/06/2009, 16:54
Avatar de a n g e l u s  
Fecha de Ingreso: enero-2006
Ubicación: Chile
Mensajes: 237
Antigüedad: 19 ańos, 3 meses
Puntos: 1
Respuesta: leer un excel exportado desde asp.

Hay termina el excel, copialo guardalo en el block de notas y le agregas la extencion xls
__________________
Atte,
A n g e l u s
Concepción - Chile
más vale respuestas bien pensadas, que 7000 post
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

SíEste tema le ha gustado a 1 personas




La zona horaria es GMT -6. Ahora son las 14:52.