导出Excel表格

美好的一天,

我怎样才能在excel这个表中导出。 我已经search了几个网站,但我仍然没有成功,有人可以帮助我,在这里我离开下面我使用的代码,并生成表

<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> 

我会build议查看PHPExcel库( https://github.com/PHPOffice/PHPExcel )。

问候,编辑。