Ver Mensaje Individual
  #2 (permalink)  
Antiguo 24/03/2006, 21:28
Avatar de icebeam
icebeam
 
Fecha de Ingreso: marzo-2006
Mensajes: 27
Antigüedad: 18 años, 1 mes
Puntos: 0
Aqui te va este script, ojalá te sirva:

Código PHP:
<?php
header
("Content-type: application/vnd.ms-excel"); 
header("Content-Disposition: attachment; filename=excel.xls"); 

$x 20;
srand((double)microtime()*1000000);

echo 
"<table>"
echo 
"<tr>";
echo 
"<td>No.</td>";
echo 
"<td>Anaquel</td>"
echo 
"<td>Exis</td>"
echo 
"<td>Clave</td>"
echo 
"<td>Descripcion</td>"
echo 
"<td></td>"
echo 
"<td>Costo U</td>"
echo 
"</tr>";
for (
$i 1$i <= $x$i++)

echo 
"<tr>"
echo 
"<td>" $i "</td>"
echo 
"<td>A" rand(1,100) . "</td>"
echo 
"<td>" rand(1,100) . "</td>"
echo 
"<td>CLAVE " $i "</td>"
echo 
"<td>PRODUCTO " $i "</td>"
echo 
"<td>$</td>"
echo 
"<td>" rand(1,100) . "</td>"
echo 
"</tr>"

echo 
"</table>"
?>