SlideShare a Scribd company logo
1 of 7
Download to read offline
EXPORTAR REPORTES CON PHP
Exportar Reportes en PDF
Exportar Reportes en EXCEL
Exportar Reportes en WORD
Este es el reporte en .doc
El documento index.php es
<head>
<title>EJEMPLO REPORTES EN PHP</title>
</head>
<body>
<center><img src="imagenes/sello.jpg" width="650" height="76" /></center>
<p><br />
<table border="2" width="500" bgcolor="#00CCFF" align="center">
<tr>
<td align="center" colspan="2">
<strong>EXPORTAR REPORTES CON PHP</strong>
</td>
<tr>
<td width="439"><strong>Exportar Reportes en PDF</strong></td>
<td width="145" align="center"><a href="reporte_pdf.php"><img src="imagenes/pdf.png"
width="30" height="25"/></a></td>
</tr>
<tr>
<td><strong>Exportar Reportes en EXCEL</strong></td>
<td align="center"><a href="reporte_excel.php"><img src="imagenes/excel.png"
width="30" height="25"/></a></td>
</tr>
<tr>
<td><strong>Exportar Reportes en WORD</strong></td>
<td align="center"><a href="reporte_word.php"><img src="imagenes/word.png"
width="30" height="25"/></a></td>
</tr>
</table>
</body>
</html>
Los documentos php para generar los reportes en Word, pdf y Excel son
<?php
header("Content-type: application/vnd.ms-word");
header("Content-Disposition: attachment;
filename=Reporte_Personal_usuarios.doc");
$conexion=mysql_connect("localhost","root","");
mysql_select_db("ejemplo_pdf",$conexion);
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"
/>
<title>LISTA DE USUARIOS</title>
</head>
<body>
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td colspan="6" bgcolor="skyblue"><CENTER><strong>REPORTE DE
LA TABLA USUARIOS</strong></CENTER></td>
</tr>
<tr bgcolor="red">
<td><strong>CODIGO</strong></td>
<td><strong>NOMBRE</strong></td>
<td><strong>APELLIDO</strong></td>
<td><strong>PAIS</strong></td>
<td><strong>EDAD</strong></td>
<td><strong>DNI</strong></td>
</tr>
<?PHP
$sql=mysql_query("select cod_usu,nombre,Apellido,Pais,edad,dni
from usuarios");
while($res=mysql_fetch_array($sql)){
$codigo=$res["cod_usu"];
$nombre=$res["nombre"];
$Apellido=$res["Apellido"];
$Pais=$res["Pais"];
$edad=$res["edad"];
$dni=$res["dni"];
?>
<tr>
<td><?php echo $codigo; ?></td>
<td><?php echo $nombre; ?></td>
<td><?php echo $Apellido; ?></td>
<td><?php echo $Pais; ?></td>
<td><?php echo $edad; ?></td>
<td><?php echo $dni; ?></td>
</tr>
<?php
}
?>
</table>
</body>
</html>
<?php
require_once("dompdf-0.5.1/dompdf_config.inc.php");
$conexion=mysql_connect("localhost","root","");
mysql_select_db("ejemplo_pdf",$conexion);
$codigoHTML='
<head>
<title>Documento sin tÃtulo</title>
</head>
<body>
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td colspan="6" bgcolor="skyblue"><CENTER><strong>REPORTE DE
LA TABLA USUARIOS</strong></CENTER></td>
</tr>
<tr bgcolor="red">
<td><strong>CODIGO</strong></td>
<td><strong>NOMBRE</strong></td>
<td><strong>APELLIDO</strong></td>
<td><strong>PAIS</strong></td>
<td><strong>EDAD</strong></td>
<td><strong>DNI</strong></td>
</tr>';
$sql=mysql_query("select * from usuarios");
while($res=mysql_fetch_array($sql)){
$codigoHTML.='
<tr>
<td>'.$res['cod_usu'].'</td>
<td>'.$res['nombre'].'</td>
<td>'.$res['Apellido'].'</td>
<td>'.$res['Pais'].'</td>
<td>'.$res['edad'].'</td>
<td>'.$res['dni'].'</td>
</tr>';
}
$codigoHTML.='
</table>
</body>
</html>';
$codigoHTML=utf8_encode($codigoHTML);
$dompdf=new DOMPDF();
$dompdf->load_html($codigoHTML);
ini_set("memory_limit","128M");
$dompdf->render();
$dompdf->stream("Reporte_tabla_usuarios.pdf");
?>
<?php
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment;
filename=Reporte_Personal_usuarios.xls");
$conexion=mysql_connect("localhost","root","");
mysql_select_db("ejemplo_pdf",$conexion);
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"
/>
<title>LISTA DE USUARIOS</title>
</head>
<body>
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td colspan="6" bgcolor="skyblue"><CENTER><strong>REPORTE DE
LA TABLA USUARIOS</strong></CENTER></td>
</tr>
<tr bgcolor="red">
<td><strong>CODIGO</strong></td>
<td><strong>NOMBRE</strong></td>
<td><strong>APELLIDO</strong></td>
<td><strong>PAIS</strong></td>
<td><strong>EDAD</strong></td>
<td><strong>DNI</strong></td>
</tr>
<?PHP
$sql=mysql_query("select cod_usu,nombre,Apellido,Pais,edad,dni
from usuarios");
while($res=mysql_fetch_array($sql)){
$codigo=$res["cod_usu"];
$nombre=$res["nombre"];
$Apellido=$res["Apellido"];
$Pais=$res["Pais"];
$edad=$res["edad"];
$dni=$res["dni"];
?>
<tr>
<td><?php echo $codigo; ?></td>
<td><?php echo $nombre; ?></td>
<td><?php echo $Apellido; ?></td>
<td><?php echo $Pais; ?></td>
<td><?php echo $edad; ?></td>
<td><?php echo $dni; ?></td>
</tr>
<?php
}
?>
</table>
</body>
</html>
Para los íconos de word, pdf y excel, pueden utilizar google y descargarla desde internet y
colocarla en la carpeta de imágenes y disenar el aviso que se encuentra en la parte superior
del index.html
Este es el código para exportar a pdf con dompdf
$codigoHTML=utf8_encode($codigoHTML);
$dompdf=new DOMPDF();
$dompdf->load_html($codigoHTML);
ini_set("memory_limit","128M");
$dompdf->render();
$dompdf->stream("nombre.pdf");
Reportes en php

More Related Content

Viewers also liked

ооо «бизнесстрой»
ооо «бизнесстрой»ооо «бизнесстрой»
ооо «бизнесстрой»
Aleksandr Tsurikov
 
Frases espiritualistas
Frases espiritualistasFrases espiritualistas
Frases espiritualistas
Márcia Diniz
 
Humility Movie Ppt Version Sample
Humility Movie Ppt Version SampleHumility Movie Ppt Version Sample
Humility Movie Ppt Version Sample
Andrew Schwartz
 

Viewers also liked (11)

ооо «бизнесстрой»
ооо «бизнесстрой»ооо «бизнесстрой»
ооо «бизнесстрой»
 
Frases espiritualistas
Frases espiritualistasFrases espiritualistas
Frases espiritualistas
 
Honolulu Rail Transit - Kalihi Station
Honolulu Rail Transit - Kalihi StationHonolulu Rail Transit - Kalihi Station
Honolulu Rail Transit - Kalihi Station
 
Normatividad vigente atendiendo los 3 ordenes de gobiernos
Normatividad vigente atendiendo los 3 ordenes de gobiernosNormatividad vigente atendiendo los 3 ordenes de gobiernos
Normatividad vigente atendiendo los 3 ordenes de gobiernos
 
Character development - Humility
Character development - HumilityCharacter development - Humility
Character development - Humility
 
Amor o caráter do cristão
Amor o caráter do cristãoAmor o caráter do cristão
Amor o caráter do cristão
 
Humility Movie Ppt Version Sample
Humility Movie Ppt Version SampleHumility Movie Ppt Version Sample
Humility Movie Ppt Version Sample
 
Preparation and staining of peripheral blood smear
Preparation and staining of peripheral blood smearPreparation and staining of peripheral blood smear
Preparation and staining of peripheral blood smear
 
[#openIQUII - Workshop] Gamification e Loyalty
[#openIQUII - Workshop] Gamification e Loyalty[#openIQUII - Workshop] Gamification e Loyalty
[#openIQUII - Workshop] Gamification e Loyalty
 
Jodo Mission Bulletin - May 2016
Jodo Mission Bulletin - May 2016Jodo Mission Bulletin - May 2016
Jodo Mission Bulletin - May 2016
 
Discipulado profundo, uma introdução
Discipulado profundo, uma introduçãoDiscipulado profundo, uma introdução
Discipulado profundo, uma introdução
 

More from jbersosa

Auditoriasistemasi 150703002656-lva1-app6891
Auditoriasistemasi 150703002656-lva1-app6891Auditoriasistemasi 150703002656-lva1-app6891
Auditoriasistemasi 150703002656-lva1-app6891
jbersosa
 
Auditoría de sistemas de información presentación
Auditoría de sistemas de información presentaciónAuditoría de sistemas de información presentación
Auditoría de sistemas de información presentación
jbersosa
 
Realizar investigación y hacer un análisis por cada tema asignado al particip...
Realizar investigación y hacer un análisis por cada tema asignado al particip...Realizar investigación y hacer un análisis por cada tema asignado al particip...
Realizar investigación y hacer un análisis por cada tema asignado al particip...
jbersosa
 
Bases de datos mysql y repotes usando jasper report
Bases de datos mysql y repotes usando jasper reportBases de datos mysql y repotes usando jasper report
Bases de datos mysql y repotes usando jasper report
jbersosa
 

More from jbersosa (20)

Las excepciones standar
Las excepciones standarLas excepciones standar
Las excepciones standar
 
Mas sobre excepciones
Mas sobre excepcionesMas sobre excepciones
Mas sobre excepciones
 
Estructuras de control try catch
Estructuras de control try catchEstructuras de control try catch
Estructuras de control try catch
 
Main
MainMain
Main
 
Clasen1java
Clasen1javaClasen1java
Clasen1java
 
Programación java1
Programación java1Programación java1
Programación java1
 
Tercercortesistop
TercercortesistopTercercortesistop
Tercercortesistop
 
Encapsulacion
EncapsulacionEncapsulacion
Encapsulacion
 
Administracion de la memoria principal
Administracion de  la memoria principalAdministracion de  la memoria principal
Administracion de la memoria principal
 
Auditoria 2
Auditoria 2Auditoria 2
Auditoria 2
 
Auditoriasistemasi 150703002656-lva1-app6891
Auditoriasistemasi 150703002656-lva1-app6891Auditoriasistemasi 150703002656-lva1-app6891
Auditoriasistemasi 150703002656-lva1-app6891
 
Auditoria informatica
Auditoria informaticaAuditoria informatica
Auditoria informatica
 
Auditoria de sistemas (1)
Auditoria de sistemas (1)Auditoria de sistemas (1)
Auditoria de sistemas (1)
 
Auditoría de sistemas de información presentación
Auditoría de sistemas de información presentaciónAuditoría de sistemas de información presentación
Auditoría de sistemas de información presentación
 
Realizar investigación y hacer un análisis por cada tema asignado al particip...
Realizar investigación y hacer un análisis por cada tema asignado al particip...Realizar investigación y hacer un análisis por cada tema asignado al particip...
Realizar investigación y hacer un análisis por cada tema asignado al particip...
 
Sistemas operativos
Sistemas operativosSistemas operativos
Sistemas operativos
 
Php
PhpPhp
Php
 
Estructura de una red
Estructura de una redEstructura de una red
Estructura de una red
 
Proyectodeprogramacinidesegundocorte2015 2
Proyectodeprogramacinidesegundocorte2015 2Proyectodeprogramacinidesegundocorte2015 2
Proyectodeprogramacinidesegundocorte2015 2
 
Bases de datos mysql y repotes usando jasper report
Bases de datos mysql y repotes usando jasper reportBases de datos mysql y repotes usando jasper report
Bases de datos mysql y repotes usando jasper report
 

Recently uploaded

ANALISIS Y DISEÑO POR VIENTO, DE EDIFICIOS ALTOS, SEGUN ASCE-2016, LAURA RAMIREZ
ANALISIS Y DISEÑO POR VIENTO, DE EDIFICIOS ALTOS, SEGUN ASCE-2016, LAURA RAMIREZANALISIS Y DISEÑO POR VIENTO, DE EDIFICIOS ALTOS, SEGUN ASCE-2016, LAURA RAMIREZ
ANALISIS Y DISEÑO POR VIENTO, DE EDIFICIOS ALTOS, SEGUN ASCE-2016, LAURA RAMIREZ
gustavoiashalom
 
Tipos de suelo y su clasificación y ejemplos
Tipos de suelo y su clasificación y ejemplosTipos de suelo y su clasificación y ejemplos
Tipos de suelo y su clasificación y ejemplos
andersonsubero28
 
sistema de CLORACIÓN DE AGUA POTABLE gst
sistema de CLORACIÓN DE AGUA POTABLE gstsistema de CLORACIÓN DE AGUA POTABLE gst
sistema de CLORACIÓN DE AGUA POTABLE gst
DavidRojas870673
 
analisis tecnologico( diagnostico tecnologico, herramienta de toma de deciones)
analisis tecnologico( diagnostico tecnologico, herramienta de toma de deciones)analisis tecnologico( diagnostico tecnologico, herramienta de toma de deciones)
analisis tecnologico( diagnostico tecnologico, herramienta de toma de deciones)
Ricardo705519
 

Recently uploaded (20)

Presentacion de la ganaderia en la región
Presentacion de la ganaderia en la regiónPresentacion de la ganaderia en la región
Presentacion de la ganaderia en la región
 
NTC 3883 análisis sensorial. metodología. prueba duo-trio.pdf
NTC 3883 análisis sensorial. metodología. prueba duo-trio.pdfNTC 3883 análisis sensorial. metodología. prueba duo-trio.pdf
NTC 3883 análisis sensorial. metodología. prueba duo-trio.pdf
 
PostgreSQL on Kubernetes Using GitOps and ArgoCD
PostgreSQL on Kubernetes Using GitOps and ArgoCDPostgreSQL on Kubernetes Using GitOps and ArgoCD
PostgreSQL on Kubernetes Using GitOps and ArgoCD
 
libro de ingeniería de petróleos y operaciones
libro de ingeniería de petróleos y operacioneslibro de ingeniería de petróleos y operaciones
libro de ingeniería de petróleos y operaciones
 
422382393-Curso-de-Tableros-Electricos.pptx
422382393-Curso-de-Tableros-Electricos.pptx422382393-Curso-de-Tableros-Electricos.pptx
422382393-Curso-de-Tableros-Electricos.pptx
 
semana-08-clase-transformadores-y-norma-eep.ppt
semana-08-clase-transformadores-y-norma-eep.pptsemana-08-clase-transformadores-y-norma-eep.ppt
semana-08-clase-transformadores-y-norma-eep.ppt
 
ANALISIS Y DISEÑO POR VIENTO, DE EDIFICIOS ALTOS, SEGUN ASCE-2016, LAURA RAMIREZ
ANALISIS Y DISEÑO POR VIENTO, DE EDIFICIOS ALTOS, SEGUN ASCE-2016, LAURA RAMIREZANALISIS Y DISEÑO POR VIENTO, DE EDIFICIOS ALTOS, SEGUN ASCE-2016, LAURA RAMIREZ
ANALISIS Y DISEÑO POR VIENTO, DE EDIFICIOS ALTOS, SEGUN ASCE-2016, LAURA RAMIREZ
 
Análisis de Costos y Presupuestos CAPECO
Análisis de Costos y Presupuestos CAPECOAnálisis de Costos y Presupuestos CAPECO
Análisis de Costos y Presupuestos CAPECO
 
Tipos de suelo y su clasificación y ejemplos
Tipos de suelo y su clasificación y ejemplosTipos de suelo y su clasificación y ejemplos
Tipos de suelo y su clasificación y ejemplos
 
SESION 02-DENSIDAD DE POBLACION Y DEMANDA DE AGUA (19-03-2024).pdf
SESION 02-DENSIDAD DE POBLACION Y DEMANDA DE AGUA (19-03-2024).pdfSESION 02-DENSIDAD DE POBLACION Y DEMANDA DE AGUA (19-03-2024).pdf
SESION 02-DENSIDAD DE POBLACION Y DEMANDA DE AGUA (19-03-2024).pdf
 
Sistemas de Ecuaciones no lineales-1.pptx
Sistemas de Ecuaciones no lineales-1.pptxSistemas de Ecuaciones no lineales-1.pptx
Sistemas de Ecuaciones no lineales-1.pptx
 
DIAPOSITIVAS DE SEGURIDAD Y SALUD EN EL TRABAJO
DIAPOSITIVAS DE SEGURIDAD Y SALUD EN EL TRABAJODIAPOSITIVAS DE SEGURIDAD Y SALUD EN EL TRABAJO
DIAPOSITIVAS DE SEGURIDAD Y SALUD EN EL TRABAJO
 
sistema de CLORACIÓN DE AGUA POTABLE gst
sistema de CLORACIÓN DE AGUA POTABLE gstsistema de CLORACIÓN DE AGUA POTABLE gst
sistema de CLORACIÓN DE AGUA POTABLE gst
 
Tippens fisica 7eDIAPOSITIVAS TIPENS Tippens_fisica_7e_diapositivas_33.ppt
Tippens fisica 7eDIAPOSITIVAS TIPENS Tippens_fisica_7e_diapositivas_33.pptTippens fisica 7eDIAPOSITIVAS TIPENS Tippens_fisica_7e_diapositivas_33.ppt
Tippens fisica 7eDIAPOSITIVAS TIPENS Tippens_fisica_7e_diapositivas_33.ppt
 
ingenieria grafica para la carrera de ingeniera .pptx
ingenieria grafica para la carrera de ingeniera .pptxingenieria grafica para la carrera de ingeniera .pptx
ingenieria grafica para la carrera de ingeniera .pptx
 
Presentación de Redes de alcantarillado y agua potable
Presentación de Redes de alcantarillado y agua potablePresentación de Redes de alcantarillado y agua potable
Presentación de Redes de alcantarillado y agua potable
 
ATS-FORMATO cara.pdf PARA TRABAJO SEGURO
ATS-FORMATO cara.pdf  PARA TRABAJO SEGUROATS-FORMATO cara.pdf  PARA TRABAJO SEGURO
ATS-FORMATO cara.pdf PARA TRABAJO SEGURO
 
[1LLF] UNIDADES, MAGNITUDES FÍSICAS Y VECTORES.pdf
[1LLF] UNIDADES, MAGNITUDES FÍSICAS Y VECTORES.pdf[1LLF] UNIDADES, MAGNITUDES FÍSICAS Y VECTORES.pdf
[1LLF] UNIDADES, MAGNITUDES FÍSICAS Y VECTORES.pdf
 
analisis tecnologico( diagnostico tecnologico, herramienta de toma de deciones)
analisis tecnologico( diagnostico tecnologico, herramienta de toma de deciones)analisis tecnologico( diagnostico tecnologico, herramienta de toma de deciones)
analisis tecnologico( diagnostico tecnologico, herramienta de toma de deciones)
 
2024 GUIA PRACTICAS MICROBIOLOGIA- UNA 2017 (1).pdf
2024 GUIA PRACTICAS MICROBIOLOGIA- UNA 2017 (1).pdf2024 GUIA PRACTICAS MICROBIOLOGIA- UNA 2017 (1).pdf
2024 GUIA PRACTICAS MICROBIOLOGIA- UNA 2017 (1).pdf
 

Reportes en php

  • 1. EXPORTAR REPORTES CON PHP Exportar Reportes en PDF Exportar Reportes en EXCEL Exportar Reportes en WORD Este es el reporte en .doc El documento index.php es <head> <title>EJEMPLO REPORTES EN PHP</title> </head> <body> <center><img src="imagenes/sello.jpg" width="650" height="76" /></center> <p><br /> <table border="2" width="500" bgcolor="#00CCFF" align="center"> <tr> <td align="center" colspan="2"> <strong>EXPORTAR REPORTES CON PHP</strong> </td> <tr> <td width="439"><strong>Exportar Reportes en PDF</strong></td> <td width="145" align="center"><a href="reporte_pdf.php"><img src="imagenes/pdf.png" width="30" height="25"/></a></td> </tr>
  • 2. <tr> <td><strong>Exportar Reportes en EXCEL</strong></td> <td align="center"><a href="reporte_excel.php"><img src="imagenes/excel.png" width="30" height="25"/></a></td> </tr> <tr> <td><strong>Exportar Reportes en WORD</strong></td> <td align="center"><a href="reporte_word.php"><img src="imagenes/word.png" width="30" height="25"/></a></td> </tr> </table> </body> </html> Los documentos php para generar los reportes en Word, pdf y Excel son <?php header("Content-type: application/vnd.ms-word"); header("Content-Disposition: attachment; filename=Reporte_Personal_usuarios.doc"); $conexion=mysql_connect("localhost","root",""); mysql_select_db("ejemplo_pdf",$conexion); ?> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>LISTA DE USUARIOS</title> </head> <body> <table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td colspan="6" bgcolor="skyblue"><CENTER><strong>REPORTE DE LA TABLA USUARIOS</strong></CENTER></td> </tr> <tr bgcolor="red"> <td><strong>CODIGO</strong></td> <td><strong>NOMBRE</strong></td> <td><strong>APELLIDO</strong></td> <td><strong>PAIS</strong></td> <td><strong>EDAD</strong></td> <td><strong>DNI</strong></td> </tr> <?PHP
  • 3. $sql=mysql_query("select cod_usu,nombre,Apellido,Pais,edad,dni from usuarios"); while($res=mysql_fetch_array($sql)){ $codigo=$res["cod_usu"]; $nombre=$res["nombre"]; $Apellido=$res["Apellido"]; $Pais=$res["Pais"]; $edad=$res["edad"]; $dni=$res["dni"]; ?> <tr> <td><?php echo $codigo; ?></td> <td><?php echo $nombre; ?></td> <td><?php echo $Apellido; ?></td> <td><?php echo $Pais; ?></td> <td><?php echo $edad; ?></td> <td><?php echo $dni; ?></td> </tr> <?php } ?> </table> </body> </html> <?php require_once("dompdf-0.5.1/dompdf_config.inc.php"); $conexion=mysql_connect("localhost","root",""); mysql_select_db("ejemplo_pdf",$conexion); $codigoHTML=' <head> <title>Documento sin tÃtulo</title> </head> <body> <table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td colspan="6" bgcolor="skyblue"><CENTER><strong>REPORTE DE LA TABLA USUARIOS</strong></CENTER></td> </tr> <tr bgcolor="red"> <td><strong>CODIGO</strong></td> <td><strong>NOMBRE</strong></td> <td><strong>APELLIDO</strong></td>
  • 4. <td><strong>PAIS</strong></td> <td><strong>EDAD</strong></td> <td><strong>DNI</strong></td> </tr>'; $sql=mysql_query("select * from usuarios"); while($res=mysql_fetch_array($sql)){ $codigoHTML.=' <tr> <td>'.$res['cod_usu'].'</td> <td>'.$res['nombre'].'</td> <td>'.$res['Apellido'].'</td> <td>'.$res['Pais'].'</td> <td>'.$res['edad'].'</td> <td>'.$res['dni'].'</td> </tr>'; } $codigoHTML.=' </table> </body> </html>'; $codigoHTML=utf8_encode($codigoHTML); $dompdf=new DOMPDF(); $dompdf->load_html($codigoHTML); ini_set("memory_limit","128M"); $dompdf->render(); $dompdf->stream("Reporte_tabla_usuarios.pdf"); ?> <?php header("Content-type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=Reporte_Personal_usuarios.xls"); $conexion=mysql_connect("localhost","root",""); mysql_select_db("ejemplo_pdf",$conexion); ?> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>LISTA DE USUARIOS</title>
  • 5. </head> <body> <table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td colspan="6" bgcolor="skyblue"><CENTER><strong>REPORTE DE LA TABLA USUARIOS</strong></CENTER></td> </tr> <tr bgcolor="red"> <td><strong>CODIGO</strong></td> <td><strong>NOMBRE</strong></td> <td><strong>APELLIDO</strong></td> <td><strong>PAIS</strong></td> <td><strong>EDAD</strong></td> <td><strong>DNI</strong></td> </tr> <?PHP $sql=mysql_query("select cod_usu,nombre,Apellido,Pais,edad,dni from usuarios"); while($res=mysql_fetch_array($sql)){ $codigo=$res["cod_usu"]; $nombre=$res["nombre"]; $Apellido=$res["Apellido"]; $Pais=$res["Pais"]; $edad=$res["edad"]; $dni=$res["dni"]; ?> <tr> <td><?php echo $codigo; ?></td> <td><?php echo $nombre; ?></td> <td><?php echo $Apellido; ?></td> <td><?php echo $Pais; ?></td> <td><?php echo $edad; ?></td> <td><?php echo $dni; ?></td> </tr> <?php } ?> </table> </body> </html> Para los íconos de word, pdf y excel, pueden utilizar google y descargarla desde internet y colocarla en la carpeta de imágenes y disenar el aviso que se encuentra en la parte superior del index.html Este es el código para exportar a pdf con dompdf