tag:blogger.com,1999:blog-28350022.post6424533960300193770..comments2020-06-25T20:06:11.116-05:00Comments on Rich's Rants: PHP Microsoft Excel Reader and Serial Killer DatesRichard Lynchhttp://www.blogger.com/profile/03615701995633150243noreply@blogger.comBlogger17125tag:blogger.com,1999:blog-28350022.post-87063160405427678142010-09-08T02:40:53.050-05:002010-09-08T02:40:53.050-05:00Hi there ...
Go figure , that 3 years later . Thi...Hi there ...<br /><br />Go figure , that 3 years later . This post actualy saved MY 8 hours.<br />For me things worked just fine for 15 mins ... and that's all thanks to YOUR post!<br /><br />Thanks a million !<br /><br />--ExWebtemphttps://www.blogger.com/profile/15507818828418816958noreply@blogger.comtag:blogger.com,1999:blog-28350022.post-84802704847011978532010-03-18T03:18:16.045-05:002010-03-18T03:18:16.045-05:00Thanks so much ^^Thanks so much ^^Eiger Yaphttps://www.blogger.com/profile/18025381354545185991noreply@blogger.comtag:blogger.com,1999:blog-28350022.post-2905444462798009922009-09-09T12:50:29.799-05:002009-09-09T12:50:29.799-05:00Yesterday I worked with excel sheet and saved all ...Yesterday I worked with excel sheet and saved all info.But today all data were lost.And I used-<a href="http://www.recoverytoolbox.com/excel_repair_software.html" rel="nofollow">Excel repairs</a>,this tool I saw in one forum.It is free as far as I know,besides that tool can recovered contents and export of recovered data into a new document in Microsoft Excel format.Alexishttps://www.blogger.com/profile/07547255185381643744noreply@blogger.comtag:blogger.com,1999:blog-28350022.post-56011306081440308522009-01-27T22:28:00.000-06:002009-01-27T22:28:00.000-06:00Thanks Wojciech !! You're the man!!!Thanks Wojciech !! You're the man!!!Unknownhttps://www.blogger.com/profile/01377802901298713853noreply@blogger.comtag:blogger.com,1999:blog-28350022.post-42874677357431242472008-09-07T14:37:00.000-05:002008-09-07T14:37:00.000-05:00I never post comments, but now ... How can I ever ...I never post comments, but now ... How can I ever thank you? Was looking for over hours! ThanksSLhttps://www.blogger.com/profile/16509981032616063697noreply@blogger.comtag:blogger.com,1999:blog-28350022.post-12586148797137620282008-07-01T18:20:00.000-05:002008-07-01T18:20:00.000-05:00Thanks for the GetInt4d fix, daniel's code is work...Thanks for the GetInt4d fix, daniel's code is working for us on both 32 and 64 bit machines. Would have taken us a while to find this bug I think had it not been for wojciech.dangeroushttps://www.blogger.com/profile/01740758128863125353noreply@blogger.comtag:blogger.com,1999:blog-28350022.post-54444782482618655162008-03-31T16:39:00.000-05:002008-03-31T16:39:00.000-05:00Thanks a lot for to share with us your solution! I...Thanks a lot for to share with us your solution! It worked fine to solve the "exhausted memory" problem in a FreeBSD 6.2 / SMP amd64 system.<BR/><BR/>Thanks!!Unknownhttps://www.blogger.com/profile/08171969212754365381noreply@blogger.comtag:blogger.com,1999:blog-28350022.post-61592120440705934192008-03-18T11:55:00.000-05:002008-03-18T11:55:00.000-05:00about the excel Reader:I've got the files for the ...about the excel Reader:<BR/>I've got the files for the reader but the xlt file does not open with excel prg. it says that is read only file. Can you send or post the files you guys have been using to make the excel reader work?<BR/><BR/>Thanks,<BR/><BR/>JavJavierhttps://www.blogger.com/profile/12498375243192410964noreply@blogger.comtag:blogger.com,1999:blog-28350022.post-10871987527224468332008-02-21T09:28:00.000-06:002008-02-21T09:28:00.000-06:00A slightly more robust fix for GetInt4d looks like...A slightly more robust fix for GetInt4d looks like this (I don't know why your function has a preceding '_', mine's perhaps a different version):<BR/><BR/>function GetInt4d($data, $pos) {<BR/> //32/64bit architecture code:<BR/> $_or_24 = ord($data[$pos+3]);<BR/><BR/> if ($_or_24>=128)<BR/> $_ord_24 = -abs((256-$_or_24) << 24);<BR/> else<BR/> $_ord_24 = ($_or_24&127) << 24;<BR/><BR/> return ord($data[$pos]) | (ord($data[$pos+1]) << 8) | (ord($data[$pos+2]) << 16) | $_ord_24; <BR/>}<BR/><BR/>ahs10: I implemented it as a global function but anywhere that's accessible from where you want access it should be fine - it's not an existing function you have to patch but a new function you'll need to call when handling your spreadsheet. I guess you'll need to offer some more information about your project for more specific help.Unknownhttps://www.blogger.com/profile/01612083760131594794noreply@blogger.comtag:blogger.com,1999:blog-28350022.post-72704800996459869632008-02-20T18:22:00.000-06:002008-02-20T18:22:00.000-06:00hello, thanks for the fix, but i can't get it to w...hello, thanks for the fix, but i can't get it to work. where are you implementing this excel_date function?Anonymoushttps://www.blogger.com/profile/13701133637782742148noreply@blogger.comtag:blogger.com,1999:blog-28350022.post-3422964060899349302007-11-02T07:09:00.000-05:002007-11-02T07:09:00.000-05:00thanks for your solution. I didn't realize if my c...thanks for your solution. I didn't realize if my clients using 64bit AMD processor. But with a little patch you give, viola... everything work fine... thanks.. thanks... a lot !ihsanul arifinhttps://www.blogger.com/profile/02673558673367755397noreply@blogger.comtag:blogger.com,1999:blog-28350022.post-66988100850569087042007-10-23T08:16:00.000-05:002007-10-23T08:16:00.000-05:00you saved me from wasting my entire week, mate10x ...you saved me from wasting my entire week, mate<BR/><BR/>10x a lot and have a great lifeGuinevir Frenghttps://www.blogger.com/profile/01812063887563886577noreply@blogger.comtag:blogger.com,1999:blog-28350022.post-17751029790975121362007-09-28T08:10:00.000-05:002007-09-28T08:10:00.000-05:00Oh my goodness! Thanx for the blessed getInt4D hac...Oh my goodness! Thanx for the blessed getInt4D hack for 64bit systems!!!<BR/><BR/>I've almost broken my forehead digging into memory exhaust problem.<BR/><BR/>this could also help in detecting 64-bit system with PHP.<BR/>http://www.ush.it/2007/08/22/architecture-detection-by-php-anomaly/<BR/><BR/><BR/>p.s. And M$ === Must Die of couz.Unknownhttps://www.blogger.com/profile/15840079815457484822noreply@blogger.comtag:blogger.com,1999:blog-28350022.post-23376841295553203222007-09-07T03:58:00.000-05:002007-09-07T03:58:00.000-05:00If you run ExcelReader on 64 bit architecture you ...If you run ExcelReader on 64 bit architecture you will experience memory exhausting no matter the file and no matter the phsyhical memory. That is causing by overloading an integer in a program that counts that integer has 32bits!<BR/><BR/>On 64 bits Operating Systems PHP Integer has 64bits!<BR/><BR/>So i made simple solution in my version:<BR/>in excelreader file I've changed function:<BR/><BR/>_GetInt4d<BR/><BR/>from:<BR/>function _GetInt4d($data, $pos) {<BR/>return ord($data[$pos]) | (ord($data[$pos+1]) << 8) | (ord($data[$pos+2]) << 16) | (ord($data[$pos+3]) << 24);<BR/>}<BR/><BR/>to:<BR/>function _GetInt4d($data, $pos){<BR/>$result=ord($data[$pos]) | (ord($data[$pos+1]) << 8) | (ord($data[$pos+2]) << 16) | (ord($data[$pos+3]) << 24);<BR/>if ($result>268435455) $result-=4294967296;<BR/>return $result;<BR/>}<BR/><BR/>same in file oleread with GetInt4d.<BR/>I know that's poor hack but that was fast patch to allow script to work on 64 bits OS.Unknownhttps://www.blogger.com/profile/15912798843402419964noreply@blogger.comtag:blogger.com,1999:blog-28350022.post-2376506654620696652007-09-06T18:34:00.000-05:002007-09-06T18:34:00.000-05:00hi, i know of your pain. you were lucky 8 hours wa...hi, i know of your pain. you were lucky 8 hours was all you spent---me, well... luckily i found the explanation...here in your blog, first! thanks man. whew, 'intentional bug' my ass---i could shoot those crazy microsoft nerds!d'Dochttps://www.blogger.com/profile/00415263445393291282noreply@blogger.comtag:blogger.com,1999:blog-28350022.post-30234843646388364262007-08-08T23:45:00.000-05:002007-08-08T23:45:00.000-05:00When you run PHP, it has php.ini settings which al...When you run PHP, it has php.ini settings which allow it to limit the amount of RAM it will use, to make sure run-away memory leaks don't kill your machine.<BR/><BR/>So you'll need to alter php.ini to crank up that memory limit to be big enough to hold your spreadsheet.<BR/><BR/>If you are running from the command line, you can also use the -d flag to over-ride php.ini settings.<BR/>php -h<BR/>will tell you more about that.Richard Lynchhttps://www.blogger.com/profile/03615701995633150243noreply@blogger.comtag:blogger.com,1999:blog-28350022.post-86012744758746989282007-08-04T03:12:00.000-05:002007-08-04T03:12:00.000-05:00Hi,I need a help. I have installed the PHP-ExcelRe...Hi,<BR/><BR/>I need a help. I have installed the PHP-ExcelReader and corrected the file name problem. Now while trying to run the example its giving error as - <BR/><BR/>Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 512 bytes) in /home/susen/public_html/xls-read/Excel/oleread.inc on line 172<BR/><BR/>Can you suggest me solution in this regards. Thanks in advance.<BR/><BR/>regards,<BR/>susenjitUnknownhttps://www.blogger.com/profile/02665825954745761081noreply@blogger.com