1
おはよう、エクセルのエクスポートテーブル
エクスポートするにはどうすればいいですか? 私がレビューPHPExcelをお勧めします私はすでにいくつかのウェブで検索しましたが、私はまだ私が使用していたコードの下に出て、テーブル
<table id="tbAplicaciones" align="center">
<thead>
<tr >
<th width="10%" scope="col">id_solicita</th>
<th width="10%" scope="col">Nombre</th>
<th width="10%" scope="col">Destino</th>
<th width="10%" scope="col">Folio</th>
<th width="10%" scope="col">Fecha Pago</th>
<th width="10%" scope="col">Cantidad Solicitada</th>
<th width="10%" scope="col">Tipo de Gasto</th>
<th width="10%" scope="col">Importe de Gasto</th>
</tr>
</thead>
<tfoot>
<?php
$id=0;
while ($clientes = pg_fetch_object($Cat))
{
if ($numfila == 0){ $class = "alt"; $numfila = 1; } else { $class = ""; $numfila = 0; }
echo "<tr class'".$class."' style=\"height: 5px;\">";
echo "<td align='center'>".$clientes->id_solicita."</td>";
echo "<td>".utf8_decode($clientes->nombre)."</td>";
echo "<td align='center'>".$clientes->destino."</td>";
echo "<td align='center'>".$clientes->folio_gasto."</td>";
echo "<td align='center'>".$clientes->fechapago."</td>";
echo "<td align='center'>".$clientes->importe."</td>";
echo "<td align='center'>".$clientes->tipogasto."</td>";
echo "<td align='center'>".$clientes->importegasto."</td>";
echo "</tr>";
$id=$id+1;
}
if($id == 0)
// echo "Sin Sollicitudes Para Mostrar";
echo $usr2;
pg_close();
?>
</tfoot>
<tfoot>
</table>
</div> </body> </html> <?php
function ceros($numero, $ceros=2)
{
return sprintf("%0".$ceros."s", $numero);
}?>
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="src/jquery.table2excel.js"></script>
[これをチェック](https://datatables.net/extensions/buttons/examples/initialisation/export) –