<?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: PHP and Excel</title>
	<atom:link href="http://www.webdevstuff.com/87/php-and-excel.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.webdevstuff.com/87/php-and-excel.html</link>
	<description>ready-to-use resources, tutorials, tips and many other web development related stuff</description>
	<lastBuildDate>Mon, 26 Dec 2011 04:02:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: aussie</title>
		<link>http://www.webdevstuff.com/87/php-and-excel.html/comment-page-1#comment-626</link>
		<dc:creator>aussie</dc:creator>
		<pubDate>Tue, 19 Jul 2011 04:50:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopmentstuff.com/?p=87#comment-626</guid>
		<description>hi, i&#039;m tried your code, but gett the error like this :

Warning: fwrite() expects parameter 1 to be resource, string given in C:\xampp\htdocs\USO\com.php on line 5

Warning: fwrite() expects parameter 1 to be resource, string given in C:\xampp\htdocs\USO\com.php on line 7

Warning: fwrite() expects parameter 1 to be resource, string given in C:\xampp\htdocs\USO\com.php on line 8

Warning: fwrite() expects parameter 1 to be resource, string given in C:\xampp\htdocs\USO\com.php on line 9

Fatal error: Uncaught exception &#039;com_exception&#039; with message &#039;&lt;b&gt;Source:&lt;/b&gt; Microsoft Excel&lt;b&gt;Description:&lt;/b&gt; Microsoft Excel cannot access the file &#039;E:\new\als.xlsx&#039;. There are several possible reasons: • The file name or path does not exist. • The file is being used by another program. • The workbook you are trying to save has the same name as a currently open workbook.&#039; in C:\xampp\htdocs\USO\com.php:12 Stack trace: #0 C:\xampp\htdocs\USO\com.php(12): variant-&gt;Open(&#039;E:\new\als...&#039;) #1 C:\xampp\htdocs\USO\com.php(50): getDataFromExcel(&#039;E:\new\als...&#039;, 2, Array, Array) #2 {main} thrown in C:\xampp\htdocs\USO\com.php on line 12


i&#039;m using php 5.3.0 and windows 7, and ms.excel 2010 
,,
is it something to do with php version i&#039;m using??

thx b4..</description>
		<content:encoded><![CDATA[<p>hi, i&#8217;m tried your code, but gett the error like this :</p>
<p>Warning: fwrite() expects parameter 1 to be resource, string given in C:\xampp\htdocs\USO\com.php on line 5</p>
<p>Warning: fwrite() expects parameter 1 to be resource, string given in C:\xampp\htdocs\USO\com.php on line 7</p>
<p>Warning: fwrite() expects parameter 1 to be resource, string given in C:\xampp\htdocs\USO\com.php on line 8</p>
<p>Warning: fwrite() expects parameter 1 to be resource, string given in C:\xampp\htdocs\USO\com.php on line 9</p>
<p>Fatal error: Uncaught exception &#8216;com_exception&#8217; with message &#8216;<b>Source:</b> Microsoft Excel<b>Description:</b> Microsoft Excel cannot access the file &#8216;E:\new\als.xlsx&#8217;. There are several possible reasons: • The file name or path does not exist. • The file is being used by another program. • The workbook you are trying to save has the same name as a currently open workbook.&#8217; in C:\xampp\htdocs\USO\com.php:12 Stack trace: #0 C:\xampp\htdocs\USO\com.php(12): variant-&gt;Open(&#8216;E:\new\als&#8230;&#8217;) #1 C:\xampp\htdocs\USO\com.php(50): getDataFromExcel(&#8216;E:\new\als&#8230;&#8217;, 2, Array, Array) #2 {main} thrown in C:\xampp\htdocs\USO\com.php on line 12</p>
<p>i&#8217;m using php 5.3.0 and windows 7, and ms.excel 2010<br />
,,<br />
is it something to do with php version i&#8217;m using??</p>
<p>thx b4..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: smita</title>
		<link>http://www.webdevstuff.com/87/php-and-excel.html/comment-page-1#comment-618</link>
		<dc:creator>smita</dc:creator>
		<pubDate>Thu, 23 Jun 2011 05:57:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopmentstuff.com/?p=87#comment-618</guid>
		<description>is it possible to create a web page where i can view the excel file and save the changes to excel file usibg php code . the thing is the user needs to open a excel file in alocal system not with the browser . if its possible means let me know the solution.</description>
		<content:encoded><![CDATA[<p>is it possible to create a web page where i can view the excel file and save the changes to excel file usibg php code . the thing is the user needs to open a excel file in alocal system not with the browser . if its possible means let me know the solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Flavio</title>
		<link>http://www.webdevstuff.com/87/php-and-excel.html/comment-page-1#comment-616</link>
		<dc:creator>Flavio</dc:creator>
		<pubDate>Wed, 15 Jun 2011 23:38:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopmentstuff.com/?p=87#comment-616</guid>
		<description>Hello, I have this spreadsheet http://cid-5054dd243c01e71b.office.live.com/view.aspx/.Documents/Livro1.xlsx (public on the web).

if I input two values (example 15 and 0,817) 
I would like to verify the spreadsheet above
and return the value 0,8135
because I found 15 in the Column 1, Row 9
and I found 0,817 in the Column 9, Row 1
So I would like to have the value in the Cell(9,9) from the spreadsheet which is 0,8135

In another webpage (my blog, for example), How could I get 0,8135 
Using javascript or other ?
I appreciate any help about this issue.
Thank you for your time,
Flavio</description>
		<content:encoded><![CDATA[<p>Hello, I have this spreadsheet <a href="http://cid-5054dd243c01e71b.office.live.com/view.aspx/.Documents/Livro1.xlsx" rel="nofollow">http://cid-5054dd243c01e71b.office.live.com/view.aspx/.Documents/Livro1.xlsx</a> (public on the web).</p>
<p>if I input two values (example 15 and 0,817)<br />
I would like to verify the spreadsheet above<br />
and return the value 0,8135<br />
because I found 15 in the Column 1, Row 9<br />
and I found 0,817 in the Column 9, Row 1<br />
So I would like to have the value in the Cell(9,9) from the spreadsheet which is 0,8135</p>
<p>In another webpage (my blog, for example), How could I get 0,8135<br />
Using javascript or other ?<br />
I appreciate any help about this issue.<br />
Thank you for your time,<br />
Flavio</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Teddy</title>
		<link>http://www.webdevstuff.com/87/php-and-excel.html/comment-page-1#comment-586</link>
		<dc:creator>Teddy</dc:creator>
		<pubDate>Fri, 08 Apr 2011 15:28:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopmentstuff.com/?p=87#comment-586</guid>
		<description>Thanks Matthew for your constructive comment. My article has explanatory and demonstrative purpose only, so I didn&#039;t want to mess up the code with related stuff which could be usefull but make core code unclear on the other hand...</description>
		<content:encoded><![CDATA[<p>Thanks Matthew for your constructive comment. My article has explanatory and demonstrative purpose only, so I didn&#8217;t want to mess up the code with related stuff which could be usefull but make core code unclear on the other hand&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Bonner</title>
		<link>http://www.webdevstuff.com/87/php-and-excel.html/comment-page-1#comment-582</link>
		<dc:creator>Matthew Bonner</dc:creator>
		<pubDate>Fri, 08 Apr 2011 11:14:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopmentstuff.com/?p=87#comment-582</guid>
		<description>Sounds like people are giving you a hard time Teddy! To the various people complaining about errors you should maybe try reading either the comments or the PHP documentation before complaining.

Anyway, Teddy, you should really wrap anything to do with COM in a try catch block and if an exception is caught then close the application otherwise you will be left with hundreds of instances of the application running on your server. Same goes with where you are using die, this is bad and will cause your server to crash.

You should also use ignore_user_abort(true) as users who stop the page if it is taking time to work with a large spreadsheet(more than likely with COM). In addition to this you should check to see if the user has aborted and if so then close the application and then end the execution.

Other people may be interested in noting that the correct permissions need to be set up in Windows before they can use COM like so.

There are also various wrappers for reading and writing to spreadsheets that deal with all of this so you don&#039;t have to write the code.</description>
		<content:encoded><![CDATA[<p>Sounds like people are giving you a hard time Teddy! To the various people complaining about errors you should maybe try reading either the comments or the PHP documentation before complaining.</p>
<p>Anyway, Teddy, you should really wrap anything to do with COM in a try catch block and if an exception is caught then close the application otherwise you will be left with hundreds of instances of the application running on your server. Same goes with where you are using die, this is bad and will cause your server to crash.</p>
<p>You should also use ignore_user_abort(true) as users who stop the page if it is taking time to work with a large spreadsheet(more than likely with COM). In addition to this you should check to see if the user has aborted and if so then close the application and then end the execution.</p>
<p>Other people may be interested in noting that the correct permissions need to be set up in Windows before they can use COM like so.</p>
<p>There are also various wrappers for reading and writing to spreadsheets that deal with all of this so you don&#8217;t have to write the code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jiram</title>
		<link>http://www.webdevstuff.com/87/php-and-excel.html/comment-page-1#comment-573</link>
		<dc:creator>Jiram</dc:creator>
		<pubDate>Mon, 07 Mar 2011 18:20:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopmentstuff.com/?p=87#comment-573</guid>
		<description>Hi i tried your code in a machine with windows 7 and office 2007, and it works, but in another machine with te same OS and same excel it doesn&#039;t works, in both computers i used xamp, the message that appears on screen is:
Fatal error: Uncaught exception &#039;com_exception&#039; with message &#039;&lt;b&gt;Source:&lt;/b&gt; Microsoft Office Excel&lt;b&gt;Description:&lt;/b&gt; No se puede obtener acceso al archivo &#039;C:\Users\jhernandez\Documents\Centiva\BDConsupago.xls&#039;. Puede haber varios motivos: � El nombre del archivo o la ruta no existen. � Otro programa est� usando el archivo. � El libro que est� intentando guardar tiene el mismo nombre que otro libro que est� abierto en estos momentos.&#039; in C:\xampp\htdocs\consupago\prueba\restaFechas.php:15 Stack trace: #0 C:\xampp\htdocs\consupago\prueba\restaFechas.php(15): variant-&gt;Open(&#039;C:\Users\jherna...&#039;) #1 C:\xampp\htdocs\consupago\prueba\restaFechas.php(42): getDataFromExcel(&#039;C:\Users\jherna...&#039;, 1, Array, Array) #2 C:\xampp\htdocs\consupago\prueba\restaFechas.php(62): altaUsuarios(&#039;C:\Users\jherna...&#039;, 2, 1621, 1) #3 {main} thrown in C:\xampp\htdocs\consupago\prueba\restaFechas.php on line 15</description>
		<content:encoded><![CDATA[<p>Hi i tried your code in a machine with windows 7 and office 2007, and it works, but in another machine with te same OS and same excel it doesn&#8217;t works, in both computers i used xamp, the message that appears on screen is:<br />
Fatal error: Uncaught exception &#8216;com_exception&#8217; with message &#8216;<b>Source:</b> Microsoft Office Excel<b>Description:</b> No se puede obtener acceso al archivo &#8216;C:\Users\jhernandez\Documents\Centiva\BDConsupago.xls&#8217;. Puede haber varios motivos: � El nombre del archivo o la ruta no existen. � Otro programa est� usando el archivo. � El libro que est� intentando guardar tiene el mismo nombre que otro libro que est� abierto en estos momentos.&#8217; in C:\xampp\htdocs\consupago\prueba\restaFechas.php:15 Stack trace: #0 C:\xampp\htdocs\consupago\prueba\restaFechas.php(15): variant-&gt;Open(&#8216;C:\Users\jherna&#8230;&#8217;) #1 C:\xampp\htdocs\consupago\prueba\restaFechas.php(42): getDataFromExcel(&#8216;C:\Users\jherna&#8230;&#8217;, 1, Array, Array) #2 C:\xampp\htdocs\consupago\prueba\restaFechas.php(62): altaUsuarios(&#8216;C:\Users\jherna&#8230;&#8217;, 2, 1621, 1) #3 {main} thrown in C:\xampp\htdocs\consupago\prueba\restaFechas.php on line 15</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://www.webdevstuff.com/87/php-and-excel.html/comment-page-1#comment-556</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Fri, 28 Jan 2011 16:58:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopmentstuff.com/?p=87#comment-556</guid>
		<description>While is is very cool to be able to do, for most cases it seems it would be a far easier solution to save / export your excel data to a CSV and import it in MySQL.</description>
		<content:encoded><![CDATA[<p>While is is very cool to be able to do, for most cases it seems it would be a far easier solution to save / export your excel data to a CSV and import it in MySQL.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Teddy</title>
		<link>http://www.webdevstuff.com/87/php-and-excel.html/comment-page-1#comment-535</link>
		<dc:creator>Teddy</dc:creator>
		<pubDate>Tue, 09 Nov 2010 19:14:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopmentstuff.com/?p=87#comment-535</guid>
		<description>Hi Steve. I&#039;m sorry you&#039;ve encountered this issue but I have no experience with Office 2010, still using 2003 (I use to write more programs than documents in Office :-)). It looks as if new Office would handle new files bit differently... May be someone else here could post a clue... Anyway, I&#039;ll try to ask my friends and once I&#039;ll have something it&#039;ll be posted here immediately.</description>
		<content:encoded><![CDATA[<p>Hi Steve. I&#8217;m sorry you&#8217;ve encountered this issue but I have no experience with Office 2010, still using 2003 (I use to write more programs than documents in Office <img src='http://www.webdevstuff.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ). It looks as if new Office would handle new files bit differently&#8230; May be someone else here could post a clue&#8230; Anyway, I&#8217;ll try to ask my friends and once I&#8217;ll have something it&#8217;ll be posted here immediately.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve H</title>
		<link>http://www.webdevstuff.com/87/php-and-excel.html/comment-page-1#comment-534</link>
		<dc:creator>Steve H</dc:creator>
		<pubDate>Mon, 08 Nov 2010 15:58:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopmentstuff.com/?p=87#comment-534</guid>
		<description>Hi Teddy, this post has helped me literally no-end.. I&#039;ve been using it to strip data out of a spreadsheet, load it into an array then pump it into an html page. However... I&#039;ve just installed Office 2010 and suddenly my script won&#039;t execute. I&#039;m left with error &#039;Microsoft Excel can&#039;t access filename.xlsx. There are several possible reasons: • The file name or path does not exist. • The file is being used by another program. • The workbook you are trying to save has the same name as a currently open workbook&#039;, relating to the line $excel-&gt;Workbooks-&gt;Open($file) etc;

I have a feeling this is purely because of Excel 2010 (upgraded from 2007).. this subject is not at all documented online so I was wondering if you had any experience with 2010 making the script fail.

Thanks in advance!
Steve</description>
		<content:encoded><![CDATA[<p>Hi Teddy, this post has helped me literally no-end.. I&#8217;ve been using it to strip data out of a spreadsheet, load it into an array then pump it into an html page. However&#8230; I&#8217;ve just installed Office 2010 and suddenly my script won&#8217;t execute. I&#8217;m left with error &#8216;Microsoft Excel can&#8217;t access filename.xlsx. There are several possible reasons: • The file name or path does not exist. • The file is being used by another program. • The workbook you are trying to save has the same name as a currently open workbook&#8217;, relating to the line $excel-&gt;Workbooks-&gt;Open($file) etc;</p>
<p>I have a feeling this is purely because of Excel 2010 (upgraded from 2007).. this subject is not at all documented online so I was wondering if you had any experience with 2010 making the script fail.</p>
<p>Thanks in advance!<br />
Steve</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Teddy</title>
		<link>http://www.webdevstuff.com/87/php-and-excel.html/comment-page-1#comment-517</link>
		<dc:creator>Teddy</dc:creator>
		<pubDate>Tue, 05 Oct 2010 20:50:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopmentstuff.com/?p=87#comment-517</guid>
		<description>Andy, please take a look at my last reply to Raja&#039;s comment, right above yours. You can also find more answers on this error here in these comments...</description>
		<content:encoded><![CDATA[<p>Andy, please take a look at my last reply to Raja&#8217;s comment, right above yours. You can also find more answers on this error here in these comments&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

