<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comentarios en: Cómo crear archivos Excel desde PHP &#8211; Parte 2</title>
	<atom:link href="http://www.comolohago.cl/2009/09/24/como-crear-archivos-excel-desde-php-parte-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.comolohago.cl/2009/09/24/como-crear-archivos-excel-desde-php-parte-2/</link>
	<description>Si se puede, te lo enseñamos</description>
	<lastBuildDate>Sat, 11 Feb 2012 04:39:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Por: jesus castiillo</title>
		<link>http://www.comolohago.cl/2009/09/24/como-crear-archivos-excel-desde-php-parte-2/comment-page-1/#comment-57144</link>
		<dc:creator>jesus castiillo</dc:creator>
		<pubDate>Wed, 25 Jan 2012 13:42:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.comolohago.cl/?p=2168#comment-57144</guid>
		<description>hola como podria desarrolllar esto con ubuntu...</description>
		<content:encoded><![CDATA[<p>hola como podria desarrolllar esto con ubuntu&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Por: Constanza Navarro</title>
		<link>http://www.comolohago.cl/2009/09/24/como-crear-archivos-excel-desde-php-parte-2/comment-page-1/#comment-48613</link>
		<dc:creator>Constanza Navarro</dc:creator>
		<pubDate>Tue, 26 Jul 2011 00:56:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.comolohago.cl/?p=2168#comment-48613</guid>
		<description>Muchas gracias por el tutorial :)
Tuve algunas complicaciones con librerias que no tenía, pero recordé un proyecto anterior en joomla y ahí estaban las librerías.
El ejemplo me ha resultado de lo mejor :) Gracias</description>
		<content:encoded><![CDATA[<p>Muchas gracias por el tutorial <img src='http://www.comolohago.cl/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Tuve algunas complicaciones con librerias que no tenía, pero recordé un proyecto anterior en joomla y ahí estaban las librerías.<br />
El ejemplo me ha resultado de lo mejor <img src='http://www.comolohago.cl/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Gracias</p>
]]></content:encoded>
	</item>
	<item>
		<title>Por: Aid G</title>
		<link>http://www.comolohago.cl/2009/09/24/como-crear-archivos-excel-desde-php-parte-2/comment-page-1/#comment-44243</link>
		<dc:creator>Aid G</dc:creator>
		<pubDate>Tue, 03 May 2011 14:45:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.comolohago.cl/?p=2168#comment-44243</guid>
		<description>send(&#039;ejemplo.xls&#039;);

$link = pg_Connect( &quot;host=  port=5432 dbname=   user=postgres password=&#039;&#039;&quot; );

$sql = &quot;SELECT * FROM afiliado WHERE parentesco_fam_mil = &#039;8&#039; and usuario_sistema = &#039;SAMAN-INTERFASE&#039;&quot;;

$result=pg_query($link, $sql);

$numHojas = 1;
$hoja = $spreadsheet_Excel_Writer-&gt;addWorksheet(&#039;Hoja &#039;.$numHojas);

$hoja-&gt;write(0, 0, &#039;Nombre&#039;);
$hoja-&gt;write(0, 1, &#039;Apellidos&#039;);
$hoja-&gt;write(0, 2, &#039;Cedula&#039;);
$hoja-&gt;write(0, 3, &#039;Direccion&#039;);
$hoja-&gt;write(0, 4, &#039;Telefono&#039;);

	# Recupera los atributos del archivo
	$fila = 1;
	while($tagsIndex=pg_fetch_array($result)){
		
		if ($fila write($fila, 0, $tagsIndex[&#039;nombre&#039;]);
			$hoja-&gt;write($fila, 1, $tagsIndex[&#039;apellido_paterno&#039;].&#039; &#039; . $tagsIndex[&#039;apellido_materno&#039;]);
			$hoja-&gt;write($fila, 2, $tagsIndex[&#039;numero_documento&#039;]);
			$hoja-&gt;write($fila, 3, $tagsIndex[&#039;dir_habitacion&#039;]);
			$hoja-&gt;write($fila, 4, $tagsIndex[&#039;tlf_per_contacto_emerg&#039;]);
			$fila++;
			
		}else{
			
			$numHojas++;
			
			$hoja = $spreadsheet_Excel_Writer-&gt;addWorksheet(&#039;Hoja &#039;.$numHojas);
			
			$hoja-&gt;write($fila, 0, $tagsIndex[&#039;nombre&#039;]);
			$hoja-&gt;write($fila, 1, $tagsIndex[&#039;apellido_paterno&#039;].&#039; &#039; . $tagsIndex[&#039;apellido_materno&#039;]);
			$hoja-&gt;write($fila, 2, $tagsIndex[&#039;numero_documento&#039;]);
			$hoja-&gt;write($fila, 3, $tagsIndex[&#039;dir_habitacion&#039;]);
			$hoja-&gt;write($fila, 4, $tagsIndex[&#039;tlf_per_contacto_emerg&#039;]);
			$fila = 1;
			
		
		}	
	}
$spreadsheet_Excel_Writer-&gt;close();
?&gt;</description>
		<content:encoded><![CDATA[<p>send(&#8216;ejemplo.xls&#8217;);</p>
<p>$link = pg_Connect( &#8220;host=  port=5432 dbname=   user=postgres password=&#8221;&#8221; );</p>
<p>$sql = &#8220;SELECT * FROM afiliado WHERE parentesco_fam_mil = &#8216;8&#8242; and usuario_sistema = &#8216;SAMAN-INTERFASE&#8217;&#8221;;</p>
<p>$result=pg_query($link, $sql);</p>
<p>$numHojas = 1;<br />
$hoja = $spreadsheet_Excel_Writer-&gt;addWorksheet(&#8216;Hoja &#8216;.$numHojas);</p>
<p>$hoja-&gt;write(0, 0, &#8216;Nombre&#8217;);<br />
$hoja-&gt;write(0, 1, &#8216;Apellidos&#8217;);<br />
$hoja-&gt;write(0, 2, &#8216;Cedula&#8217;);<br />
$hoja-&gt;write(0, 3, &#8216;Direccion&#8217;);<br />
$hoja-&gt;write(0, 4, &#8216;Telefono&#8217;);</p>
<p>	# Recupera los atributos del archivo<br />
	$fila = 1;<br />
	while($tagsIndex=pg_fetch_array($result)){</p>
<p>		if ($fila write($fila, 0, $tagsIndex['nombre']);<br />
			$hoja-&gt;write($fila, 1, $tagsIndex['apellido_paterno'].&#8217; &#8216; . $tagsIndex['apellido_materno']);<br />
			$hoja-&gt;write($fila, 2, $tagsIndex['numero_documento']);<br />
			$hoja-&gt;write($fila, 3, $tagsIndex['dir_habitacion']);<br />
			$hoja-&gt;write($fila, 4, $tagsIndex['tlf_per_contacto_emerg']);<br />
			$fila++;</p>
<p>		}else{</p>
<p>			$numHojas++;</p>
<p>			$hoja = $spreadsheet_Excel_Writer-&gt;addWorksheet(&#8216;Hoja &#8216;.$numHojas);</p>
<p>			$hoja-&gt;write($fila, 0, $tagsIndex['nombre']);<br />
			$hoja-&gt;write($fila, 1, $tagsIndex['apellido_paterno'].&#8217; &#8216; . $tagsIndex['apellido_materno']);<br />
			$hoja-&gt;write($fila, 2, $tagsIndex['numero_documento']);<br />
			$hoja-&gt;write($fila, 3, $tagsIndex['dir_habitacion']);<br />
			$hoja-&gt;write($fila, 4, $tagsIndex['tlf_per_contacto_emerg']);<br />
			$fila = 1;</p>
<p>		}<br />
	}<br />
$spreadsheet_Excel_Writer-&gt;close();<br />
?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Por: Aid G</title>
		<link>http://www.comolohago.cl/2009/09/24/como-crear-archivos-excel-desde-php-parte-2/comment-page-1/#comment-44242</link>
		<dc:creator>Aid G</dc:creator>
		<pubDate>Tue, 03 May 2011 14:38:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.comolohago.cl/?p=2168#comment-44242</guid>
		<description>// disculpen antes de 

send(‘ejemplo.xls’);

// va esto

&lt;?php

require_once &#039;Writer.php&#039;;

$spreadsheet_Excel_Writer = new Spreadsheet_Excel_Writer();

// recuerden que tienen que cambiar ‘’ por comillas simples &#039;&#039;, porque aveces de error</description>
		<content:encoded><![CDATA[<p>// disculpen antes de </p>
<p>send(‘ejemplo.xls’);</p>
<p>// va esto</p>
<p>&lt;?php</p>
<p>require_once &#039;Writer.php&#039;;</p>
<p>$spreadsheet_Excel_Writer = new Spreadsheet_Excel_Writer();</p>
<p>// recuerden que tienen que cambiar ‘’ por comillas simples &#039;&#039;, porque aveces de error</p>
]]></content:encoded>
	</item>
	<item>
		<title>Por: Aid G</title>
		<link>http://www.comolohago.cl/2009/09/24/como-crear-archivos-excel-desde-php-parte-2/comment-page-1/#comment-44240</link>
		<dc:creator>Aid G</dc:creator>
		<pubDate>Tue, 03 May 2011 14:34:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.comolohago.cl/?p=2168#comment-44240</guid>
		<description>send(&#039;ejemplo.xls&#039;);

$link = pg_Connect( &quot;host= port= dbname= user=postgres password=&#039;&#039;&quot; );

$pgs = &quot;SELECT * FROM afiliado&quot;;

$result=pg_query($link, $pgs);

$numHojas = 1;
$hoja = $spreadsheet_Excel_Writer-&gt;addWorksheet(&#039;Hoja &#039;.$numHojas);

$hoja-&gt;write(0, 0, &#039;Nombre&#039;);
$hoja-&gt;write(0, 1, &#039;Apellidos&#039;);
$hoja-&gt;write(0, 2, &#039;Cedula&#039;);
$hoja-&gt;write(0, 3, &#039;Direccion&#039;);
$hoja-&gt;write(0, 4, &#039;Telefono&#039;);

	$fila = 1;
	while($tagsIndex=pg_fetch_array($result)){
		
		if ($fila write($fila, 0, $tagsIndex[&#039;nombre&#039;]);
			$hoja-&gt;write($fila, 1, $tagsIndex[&#039;apellido_paterno&#039;].&#039; &#039; . $tagsIndex[&#039;apellido_materno&#039;]);
			$hoja-&gt;write($fila, 2, $tagsIndex[&#039;numero_documento&#039;]);
			$hoja-&gt;write($fila, 3, $tagsIndex[&#039;dir_habitacion&#039;]);
			$hoja-&gt;write($fila, 4, $tagsIndex[&#039;tlf_per_contacto_emerg&#039;]);
			$fila++;
			
		}else{
			
			$numHojas++;
			
			$hoja = $spreadsheet_Excel_Writer-&gt;addWorksheet(&#039;Hoja &#039;.$numHojas);
			
			$hoja-&gt;write($fila, 0, $tagsIndex[&#039;nombre&#039;]);
			$hoja-&gt;write($fila, 1, $tagsIndex[&#039;apellido_paterno&#039;].&#039; &#039; . $tagsIndex[&#039;apellido_materno&#039;]);
			$hoja-&gt;write($fila, 2, $tagsIndex[&#039;numero_documento&#039;]);
			$hoja-&gt;write($fila, 3, $tagsIndex[&#039;dir_habitacion&#039;]);
			$hoja-&gt;write($fila, 4, $tagsIndex[&#039;tlf_per_contacto_emerg&#039;]);
			$fila = 1;
			
		
		}
		
	}

$spreadsheet_Excel_Writer-&gt;close();
?&gt;

Mediante este codigo pueden generar tantas hojas necesites y salta la pagina segun el contador $fila.
se crea otra hoja por la instancia al metodo addWorksheet de write.php

espero que les sirva de ayuda</description>
		<content:encoded><![CDATA[<p>send(&#8216;ejemplo.xls&#8217;);</p>
<p>$link = pg_Connect( &#8220;host= port= dbname= user=postgres password=&#8221;&#8221; );</p>
<p>$pgs = &#8220;SELECT * FROM afiliado&#8221;;</p>
<p>$result=pg_query($link, $pgs);</p>
<p>$numHojas = 1;<br />
$hoja = $spreadsheet_Excel_Writer-&gt;addWorksheet(&#8216;Hoja &#8216;.$numHojas);</p>
<p>$hoja-&gt;write(0, 0, &#8216;Nombre&#8217;);<br />
$hoja-&gt;write(0, 1, &#8216;Apellidos&#8217;);<br />
$hoja-&gt;write(0, 2, &#8216;Cedula&#8217;);<br />
$hoja-&gt;write(0, 3, &#8216;Direccion&#8217;);<br />
$hoja-&gt;write(0, 4, &#8216;Telefono&#8217;);</p>
<p>	$fila = 1;<br />
	while($tagsIndex=pg_fetch_array($result)){</p>
<p>		if ($fila write($fila, 0, $tagsIndex['nombre']);<br />
			$hoja-&gt;write($fila, 1, $tagsIndex['apellido_paterno'].&#8217; &#8216; . $tagsIndex['apellido_materno']);<br />
			$hoja-&gt;write($fila, 2, $tagsIndex['numero_documento']);<br />
			$hoja-&gt;write($fila, 3, $tagsIndex['dir_habitacion']);<br />
			$hoja-&gt;write($fila, 4, $tagsIndex['tlf_per_contacto_emerg']);<br />
			$fila++;</p>
<p>		}else{</p>
<p>			$numHojas++;</p>
<p>			$hoja = $spreadsheet_Excel_Writer-&gt;addWorksheet(&#8216;Hoja &#8216;.$numHojas);</p>
<p>			$hoja-&gt;write($fila, 0, $tagsIndex['nombre']);<br />
			$hoja-&gt;write($fila, 1, $tagsIndex['apellido_paterno'].&#8217; &#8216; . $tagsIndex['apellido_materno']);<br />
			$hoja-&gt;write($fila, 2, $tagsIndex['numero_documento']);<br />
			$hoja-&gt;write($fila, 3, $tagsIndex['dir_habitacion']);<br />
			$hoja-&gt;write($fila, 4, $tagsIndex['tlf_per_contacto_emerg']);<br />
			$fila = 1;</p>
<p>		}</p>
<p>	}</p>
<p>$spreadsheet_Excel_Writer-&gt;close();<br />
?&gt;</p>
<p>Mediante este codigo pueden generar tantas hojas necesites y salta la pagina segun el contador $fila.<br />
se crea otra hoja por la instancia al metodo addWorksheet de write.php</p>
<p>espero que les sirva de ayuda</p>
]]></content:encoded>
	</item>
	<item>
		<title>Por: Jesus B</title>
		<link>http://www.comolohago.cl/2009/09/24/como-crear-archivos-excel-desde-php-parte-2/comment-page-1/#comment-35602</link>
		<dc:creator>Jesus B</dc:creator>
		<pubDate>Mon, 20 Sep 2010 13:58:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.comolohago.cl/?p=2168#comment-35602</guid>
		<description>Saludos, quisiera aportar algo de ayuda con referente a  insertar imáenes en un archivo excel, usando esta maravillosa clase, porque tuve muchos problemas para averiguarlo.
$hoja-&gt;insertBitmap(0,0,$images);
Me gustaria que alguien me ayudara para combinar celdas
Saludos y gracias</description>
		<content:encoded><![CDATA[<p>Saludos, quisiera aportar algo de ayuda con referente a  insertar imáenes en un archivo excel, usando esta maravillosa clase, porque tuve muchos problemas para averiguarlo.<br />
$hoja-&gt;insertBitmap(0,0,$images);<br />
Me gustaria que alguien me ayudara para combinar celdas<br />
Saludos y gracias</p>
]]></content:encoded>
	</item>
	<item>
		<title>Por: Alfredo</title>
		<link>http://www.comolohago.cl/2009/09/24/como-crear-archivos-excel-desde-php-parte-2/comment-page-1/#comment-34818</link>
		<dc:creator>Alfredo</dc:creator>
		<pubDate>Sat, 21 Aug 2010 06:17:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.comolohago.cl/?p=2168#comment-34818</guid>
		<description>Disculpen, ya vi el detalle.
 
Saludos por excelente POST.</description>
		<content:encoded><![CDATA[<p>Disculpen, ya vi el detalle.<br />
 <br />
Saludos por excelente POST.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Por: Alfredo</title>
		<link>http://www.comolohago.cl/2009/09/24/como-crear-archivos-excel-desde-php-parte-2/comment-page-1/#comment-34817</link>
		<dc:creator>Alfredo</dc:creator>
		<pubDate>Sat, 21 Aug 2010 06:13:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.comolohago.cl/?p=2168#comment-34817</guid>
		<description>Es importante saber si soporta formatos.
¿Cómo se puede formatear el documento?
¿Hay comandos para negritas, colore de celda, combinar celdas, alinear?
 
Gracias.</description>
		<content:encoded><![CDATA[<p>Es importante saber si soporta formatos.<br />
¿Cómo se puede formatear el documento?<br />
¿Hay comandos para negritas, colore de celda, combinar celdas, alinear?<br />
 <br />
Gracias.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Por: Esteban mattar</title>
		<link>http://www.comolohago.cl/2009/09/24/como-crear-archivos-excel-desde-php-parte-2/comment-page-1/#comment-33083</link>
		<dc:creator>Esteban mattar</dc:creator>
		<pubDate>Thu, 01 Jul 2010 20:08:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.comolohago.cl/?p=2168#comment-33083</guid>
		<description>hola mira segui al pie de la letra todos tus pasos kashai pero hubo uno ke no me resulto el de instalar el
pear install Spreadsheet_Excel_Writer-0.9.1
solo ke yo baje la version 0.9.2 :S no kreo ke influya mucho ahora una vez ke hago el ejemplo ke sale el primero me arroja el sgt error
 
&lt;strong&gt;Parse error&lt;/strong&gt;: parse error in &lt;strong&gt;C:\wamp\www\otros\ejemplo.php&lt;/strong&gt; on line  &lt;strong&gt;12&lt;/strong&gt;
 
&lt;strong&gt;y la linea 12 lo ke tiene es&lt;/strong&gt;
&lt;strong&gt;$hoja =&amp; $libro-&gt;addWorksheet(‘Hoja de prueba’);
&lt;/strong&gt;
 
&lt;strong&gt;no se ke hacer porfa si me ayudas
&lt;/strong&gt;</description>
		<content:encoded><![CDATA[<p>hola mira segui al pie de la letra todos tus pasos kashai pero hubo uno ke no me resulto el de instalar el<br />
pear install Spreadsheet_Excel_Writer-0.9.1<br />
solo ke yo baje la version 0.9.2 :S no kreo ke influya mucho ahora una vez ke hago el ejemplo ke sale el primero me arroja el sgt error<br />
 <br />
<strong>Parse error</strong>: parse error in <strong>C:\wamp\www\otros\ejemplo.php</strong> on line  <strong>12</strong><br />
 <br />
<strong>y la linea 12 lo ke tiene es</strong><br />
<strong>$hoja =&amp; $libro-&gt;addWorksheet(‘Hoja de prueba’);<br />
</strong><br />
 <br />
<strong>no se ke hacer porfa si me ayudas<br />
</strong></p>
]]></content:encoded>
	</item>
	<item>
		<title>Por: Xabadu</title>
		<link>http://www.comolohago.cl/2009/09/24/como-crear-archivos-excel-desde-php-parte-2/comment-page-1/#comment-24293</link>
		<dc:creator>Xabadu</dc:creator>
		<pubDate>Fri, 04 Dec 2009 01:35:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.comolohago.cl/?p=2168#comment-24293</guid>
		<description>@Arturo: La verdad solamente ocupamos los bordes para el formato, por lo que desconozco si habrá alguna otra forma. Te recomiendo revisar la documentación que dimos al final del tutorial.
Saludos!</description>
		<content:encoded><![CDATA[<p>@Arturo: La verdad solamente ocupamos los bordes para el formato, por lo que desconozco si habrá alguna otra forma. Te recomiendo revisar la documentación que dimos al final del tutorial.<br />
Saludos!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

