<?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>Comments on: Export from MySQL to Excel using PHP</title>
	<atom:link href="http://blog.zemoon.com/export-from-mysql-to-excel-using-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.zemoon.com/export-from-mysql-to-excel-using-php/</link>
	<description>Web developing Tips&#038;Tricks by Vlatko Zdrale</description>
	<lastBuildDate>Tue, 05 May 2009 16:13:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Vlatko Zdrale</title>
		<link>http://blog.zemoon.com/export-from-mysql-to-excel-using-php/comment-page-1/#comment-331</link>
		<dc:creator>Vlatko Zdrale</dc:creator>
		<pubDate>Fri, 20 Mar 2009 16:59:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.zemoon.com/export-from-mysql-to-excel-using-php/#comment-331</guid>
		<description>Thanks Batty for your contribution. I&#039;ll compile all these methods for exporting mysql into excel in one big post when I find some time to work on it.</description>
		<content:encoded><![CDATA[<p>Thanks Batty for your contribution. I&#8217;ll compile all these methods for exporting mysql into excel in one big post when I find some time to work on it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: batty</title>
		<link>http://blog.zemoon.com/export-from-mysql-to-excel-using-php/comment-page-1/#comment-330</link>
		<dc:creator>batty</dc:creator>
		<pubDate>Fri, 20 Mar 2009 16:44:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.zemoon.com/export-from-mysql-to-excel-using-php/#comment-330</guid>
		<description>sorry ya&#039;ll.. my html keeps getting removed and or hidden.

For the first echo, between the quotes add html tablerow

second is dual quotes inside else statement. Set html for tabledata open and close so that row is nested inside them.

Third quote is end tablerow

Fourth quote outside while loop is end table.

Sorry for the spam posts, didnt know my html would be hidden and wanted to share what I had figured out with others that find this post as it ranked high in google for the search term  used &quot;export mysql to excel using php&quot;.

Cheers,

Batty13</description>
		<content:encoded><![CDATA[<p>sorry ya&#8217;ll.. my html keeps getting removed and or hidden.</p>
<p>For the first echo, between the quotes add html tablerow</p>
<p>second is dual quotes inside else statement. Set html for tabledata open and close so that row is nested inside them.</p>
<p>Third quote is end tablerow</p>
<p>Fourth quote outside while loop is end table.</p>
<p>Sorry for the spam posts, didnt know my html would be hidden and wanted to share what I had figured out with others that find this post as it ranked high in google for the search term  used &#8220;export mysql to excel using php&#8221;.</p>
<p>Cheers,</p>
<p>Batty13</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: batty</title>
		<link>http://blog.zemoon.com/export-from-mysql-to-excel-using-php/comment-page-1/#comment-329</link>
		<dc:creator>batty</dc:creator>
		<pubDate>Fri, 20 Mar 2009 16:38:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.zemoon.com/export-from-mysql-to-excel-using-php/#comment-329</guid>
		<description>kk, here is how i coded the html into the while loop for mysql data. 
Replace the word quote with actual quotation marks.
Add note ... is just shorthand for lazy

while (...)
{
$output ....
echo quotequote;
for (...)
{
if(...)
$output ....
else
echo quote quote.$row[$j].quotequote;
}
echo quotequote;
$output =preg......
print(....)
}
echo quotequote;</description>
		<content:encoded><![CDATA[<p>kk, here is how i coded the html into the while loop for mysql data.<br />
Replace the word quote with actual quotation marks.<br />
Add note &#8230; is just shorthand for lazy</p>
<p>while (&#8230;)<br />
{<br />
$output &#8230;.<br />
echo quotequote;<br />
for (&#8230;)<br />
{<br />
if(&#8230;)<br />
$output &#8230;.<br />
else<br />
echo quote quote.$row[$j].quotequote;<br />
}<br />
echo quotequote;<br />
$output =preg&#8230;&#8230;<br />
print(&#8230;.)<br />
}<br />
echo quotequote;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: batty</title>
		<link>http://blog.zemoon.com/export-from-mysql-to-excel-using-php/comment-page-1/#comment-327</link>
		<dc:creator>batty</dc:creator>
		<pubDate>Fri, 20 Mar 2009 15:38:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.zemoon.com/export-from-mysql-to-excel-using-php/#comment-327</guid>
		<description>oops... my post doesnt show the html fields inside of echo, sorry about that..

vlatko, could you please delete that post then? it&#039;s wrong without the html : (</description>
		<content:encoded><![CDATA[<p>oops&#8230; my post doesnt show the html fields inside of echo, sorry about that..</p>
<p>vlatko, could you please delete that post then? it&#8217;s wrong without the html : (</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: batty</title>
		<link>http://blog.zemoon.com/export-from-mysql-to-excel-using-php/comment-page-1/#comment-326</link>
		<dc:creator>batty</dc:creator>
		<pubDate>Fri, 20 Mar 2009 15:35:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.zemoon.com/export-from-mysql-to-excel-using-php/#comment-326</guid>
		<description>Found a great way to add formatting! If you copy and paste text from ms word to design view of web editor, you get ms word code behind the scenes. Using this principle, I created an excel formatted sheet, then copy and pasted that styled sheet into a web editor design view, switched over to code view, and viola: 
excel formatted code. 

I then used that excel formatting code and added that into the correct fields or parts of the php code you&#039;ve written in the great tutorial / example.

hope you dont mind I add here for others that find yours!
Will just put the major part, the while/for loop.

NOTE: for &quot;\t&quot; I used a var instead
$sep = &quot;\t&quot;;  

//my while/for loop
while($row = mysql_fetch_row($result))
{  
//set_time_limit(60); //  		 	 	 
$output = &#039;&#039;;
echo &quot;&quot;;	
for($j=0; $j &lt; mysql_num_fields($result); $j++) 	 
{	 	
if(!isset($row[$j]))
$output .= &quot;NULL&quot;.$sep; 
else
//$output .= &quot;$row[$j]&quot;.$sep;
echo &quot;&quot;.$row[$j].&quot;&quot;;	 	   	   
}
echo &quot;&quot;;  
$output = preg_replace(&quot;/\r\n&#124;\n\r&#124;\n&#124;\r/&quot;, &#039; &#039;, $output);
print(trim($output)).&quot;\t\n&quot;;
}
echo &#039;&#039;;</description>
		<content:encoded><![CDATA[<p>Found a great way to add formatting! If you copy and paste text from ms word to design view of web editor, you get ms word code behind the scenes. Using this principle, I created an excel formatted sheet, then copy and pasted that styled sheet into a web editor design view, switched over to code view, and viola:<br />
excel formatted code. </p>
<p>I then used that excel formatting code and added that into the correct fields or parts of the php code you&#8217;ve written in the great tutorial / example.</p>
<p>hope you dont mind I add here for others that find yours!<br />
Will just put the major part, the while/for loop.</p>
<p>NOTE: for &#8220;\t&#8221; I used a var instead<br />
$sep = &#8220;\t&#8221;;  </p>
<p>//my while/for loop<br />
while($row = mysql_fetch_row($result))<br />
{<br />
//set_time_limit(60); //<br />
$output = &#8221;;<br />
echo &#8220;&#8221;;<br />
for($j=0; $j &lt; mysql_num_fields($result); $j++)<br />
{<br />
if(!isset($row[$j]))<br />
$output .= &#8220;NULL&#8221;.$sep;<br />
else<br />
//$output .= &#8220;$row[$j]&#8220;.$sep;<br />
echo &#8220;&#8221;.$row[$j].&#8221;";<br />
}<br />
echo &#8220;&#8221;;<br />
$output = preg_replace(&#8220;/\r\n|\n\r|\n|\r/&#8221;, &#8216; &#8216;, $output);<br />
print(trim($output)).&#8221;\t\n&#8221;;<br />
}<br />
echo &#8221;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vlatko Zdrale</title>
		<link>http://blog.zemoon.com/export-from-mysql-to-excel-using-php/comment-page-1/#comment-325</link>
		<dc:creator>Vlatko Zdrale</dc:creator>
		<pubDate>Fri, 20 Mar 2009 14:05:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.zemoon.com/export-from-mysql-to-excel-using-php/#comment-325</guid>
		<description>Yes, I already wrote about that, and you can find that post here: &lt;a href=&quot;http://blog.zemoon.com/export-mysql-to-excel-with-style-using-php-html-tables/&quot; rel=&quot;nofollow&quot;&gt;Export MySQL to Excel with style using PHP &amp; HTML tables &lt;/a&gt;. Let me know if you have any problem implementing it. 
But I think best way of exporting to excel is &lt;a href=&quot;http://blog.zemoon.com/export-mysql-to-excel-better-way/&quot; rel=&quot;nofollow&quot;&gt;this one&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Yes, I already wrote about that, and you can find that post here: <a href="http://blog.zemoon.com/export-mysql-to-excel-with-style-using-php-html-tables/" rel="nofollow">Export MySQL to Excel with style using PHP &amp; HTML tables </a>. Let me know if you have any problem implementing it.<br />
But I think best way of exporting to excel is <a href="http://blog.zemoon.com/export-mysql-to-excel-better-way/" rel="nofollow">this one</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zemoon Blog by Vlatko Zdrale &#187; Blog Archive &#187; Export MySQL To Excel better way</title>
		<link>http://blog.zemoon.com/export-from-mysql-to-excel-using-php/comment-page-1/#comment-324</link>
		<dc:creator>Zemoon Blog by Vlatko Zdrale &#187; Blog Archive &#187; Export MySQL To Excel better way</dc:creator>
		<pubDate>Fri, 20 Mar 2009 14:02:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.zemoon.com/export-from-mysql-to-excel-using-php/#comment-324</guid>
		<description>[...] MS Excel file, but that wasn&#8217;t real excel files we were creating. Actually you were getting CSV and HTML files which excel can read. These were textual files, and now I am gonna show you how to [...]</description>
		<content:encoded><![CDATA[<p>[...] MS Excel file, but that wasn&#8217;t real excel files we were creating. Actually you were getting CSV and HTML files which excel can read. These were textual files, and now I am gonna show you how to [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: batty</title>
		<link>http://blog.zemoon.com/export-from-mysql-to-excel-using-php/comment-page-1/#comment-323</link>
		<dc:creator>batty</dc:creator>
		<pubDate>Thu, 19 Mar 2009 20:42:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.zemoon.com/export-from-mysql-to-excel-using-php/#comment-323</guid>
		<description>Do you have a short example I can see? 

Ive tried a few things and different results but nothing correct where it formats the spreadsheet like a bgcolor

Im guessing it needs to be inside the loops. Maybe a small sample of how to do for looop where you show column names of mysql fields?


thanks in advance!</description>
		<content:encoded><![CDATA[<p>Do you have a short example I can see? </p>
<p>Ive tried a few things and different results but nothing correct where it formats the spreadsheet like a bgcolor</p>
<p>Im guessing it needs to be inside the loops. Maybe a small sample of how to do for looop where you show column names of mysql fields?</p>
<p>thanks in advance!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vlatko Zdrale</title>
		<link>http://blog.zemoon.com/export-from-mysql-to-excel-using-php/comment-page-1/#comment-322</link>
		<dc:creator>Vlatko Zdrale</dc:creator>
		<pubDate>Thu, 19 Mar 2009 19:50:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.zemoon.com/export-from-mysql-to-excel-using-php/#comment-322</guid>
		<description>Yes there is a simple way to do that. You just have to push same headers as in this example and then format html table and push it after it. Excel recognizes html table and imports it. I was playing with it little bit and it work ok. You can try, and let me know if you have any questions about it.</description>
		<content:encoded><![CDATA[<p>Yes there is a simple way to do that. You just have to push same headers as in this example and then format html table and push it after it. Excel recognizes html table and imports it. I was playing with it little bit and it work ok. You can try, and let me know if you have any questions about it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: batty</title>
		<link>http://blog.zemoon.com/export-from-mysql-to-excel-using-php/comment-page-1/#comment-321</link>
		<dc:creator>batty</dc:creator>
		<pubDate>Thu, 19 Mar 2009 19:38:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.zemoon.com/export-from-mysql-to-excel-using-php/#comment-321</guid>
		<description>No problem bro,

Thanks for the awesome script!
It worked so well and was very easy to understand. :D

By the way, do you know if there is a way to have excel format the data that is dumped?
Thinks like row height, or background color? This is the next thing I need to figure out.</description>
		<content:encoded><![CDATA[<p>No problem bro,</p>
<p>Thanks for the awesome script!<br />
It worked so well and was very easy to understand. <img src='http://blog.zemoon.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>By the way, do you know if there is a way to have excel format the data that is dumped?<br />
Thinks like row height, or background color? This is the next thing I need to figure out.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.216 seconds -->
