Código HTML:
Ver original<?php
//Agregamos la conexión
include ('conectar.php');
//Parametros de la plantilla
date_default_timezone_set('Europe/Madrid');
$ho = date("j/n/Y");
$tecnico = "Abdelasis Hassan Hamed";
////Obteniendo registros de la base de datos a traves de una consulta SQL
$consulta = 'SELECT * FROM incidencias';
$resultado = mysql_query($consulta) or die (mysql_error());
if (mysql_num_rows ($resultado)) {
$datos = [];
?>
<link rel="Stylesheet" href="css/stylesheet.css"> <!--table
{mso-displayed-decimal-separator:"\,";
mso-displayed-thousand-separator:"\.";}
@page
{margin:.75in .49in .75in .54in;
mso-header-margin:.3in;
mso-footer-margin:.3in;
mso-page-orientation:landscape;}
-->
<body link="#0563C1" vlink="#954F72"> <?php
while ($filas = mysql_fetch_assoc($resultado)){
$datos [] = [
0 => $filas['hora'],
1 => $filas['tiempo'],
2 => $filas['sistema'],
// 3 => $filas['vacio'],
4 => $filas['usuario'],
5 => $filas['area'],
6 => $filas['descripcion'],
7 => $filas['estado']
];
}
?>
<table border=0 cellpadding=0 cellspacing=0 width=1062 style='border-collapse: collapse;table-layout:fixed;width:799pt' align="center">
<col width=66 style='mso-width-source:userset;mso-width-alt:2413;width:50pt'> <col width=64 style='mso-width-source:userset;mso-width-alt:2340;width:48pt'> <col width=82 style='mso-width-source:userset;mso-width-alt:2998;width:62pt'> <col width=38 style='mso-width-source:userset;mso-width-alt:1389;width:29pt'> <col width=138 style='mso-width-source:userset;mso-width-alt:5046;width:104pt'> <col width=152 style='mso-width-source:userset;mso-width-alt:5558;width:114pt'> <col width=445 style='mso-width-source:userset;mso-width-alt:16274;width:334pt'> <col width=77 style='mso-width-source:userset;mso-width-alt:2816;width:58pt'> <col width=80 style='mso-width-source:userset;mso-width-alt:2925;width:60pt'> <tr height=25 style='height:18.75pt'> <td height=25 class=xl65 width=66 style='height:18.75pt;width:50pt'>FECHA:
</td> <td colspan=2 class=xl78 width=146 style='border-right:.5pt solid black; width:110pt'><?php echo "".$ho."" ?></td> <td width=38 style='width:29pt'></td> <td width=138 style='width:104pt'></td> <td class=xl65 width=152 style='width:114pt'>TECNICO:
</td> <td colspan=2 class=xl74 width=511 style='border-right:.5pt solid black; width:384pt'><?php echo "".$tecnico."" ?></td> <td class=xl66 width=82 style='border-left:none;width:62pt'>Pag. Nº
</td> <tr height=20 style='height:15.0pt'> <td height=20 colspan=8 style='height:15.0pt;mso-ignore:colspan'></td> <tr height=23 style='height:17.25pt'> <td height=23 class=xl68 style='height:17.25pt'>HORA
</td> <td class=xl68>TIEMPO
</td> <td class=xl68>SISTEMA
</td> <td class=xl68>USUARIO
</td> <td class=xl69>DESCRIPCIÓN
</td> <td class=xl68>ESTADO
</td> <td class=xl68>PARTE
</td> <?php
//Bucle de las filas
for ($i = 0; $i < 17; $i++){
?>
<tr height=34 style='mso-height-source:userset;height:25.5pt'> <?php
//Bucle de las columnas
for ($j = 0; $j < 9; $j++){
?>
<td height=34 class=xl70 style='height:25.5pt'> <?php
//Si el dato existe y posee extensión
if (isset($datos[$i][$j]) && strlen($datos[$i][$j])){
echo $datos[$i][$j];
}
else{
echo '';
}
?>
<?php
}
?>
<?php
}
?>
<?php
}
?>
<tr height=20 style='height:15.0pt'> <td height=20 colspan=8 style='height:15.0pt;mso-ignore:colspan'></td> <tr height=20 style='height:15.0pt'> <td colspan=6 height=20 class=xl77 style='height:15.0pt'><font class="font5">N.Usuario:
</font><font class="font0"> 0=Nada, 1=Tramita con dificultad; 2=Tramita Nivel Medio;
<td colspan=2 style='mso-ignore:colspan'></td> <tr height=20 style='height:15.0pt'> <td colspan=6 height=20 class=xl77 style='height:15.0pt'><font class="font5">Estado:
</font><font class="font0"> OK=Cerrado; TR=Traslado
</font></td> <td colspan=2 style='mso-ignore:colspan'></td> <tr height=0 style='display:none'> <td width=66 style='width:50pt'></td> <td width=64 style='width:48pt'></td> <td width=82 style='width:62pt'></td> <td width=38 style='width:29pt'></td> <td width=138 style='width:104pt'></td> <td width=152 style='width:114pt'></td> <td width=445 style='width:334pt'></td> <td width=77 style='width:58pt'></td>
Funciono gracias ahora tengo un problema en una columna la cual la quiero justificar a la izquierda las otras que esten centradas que solucion me das gracias.