From: Matt Neimeyer on
I created a stream wrapper around the php_writeexcel library found at
http://www.bettina-attack.de/jonny/view.php/projects/php_writeexcel/

My code can be seen at http://www.pastebin.com/m7212eaa2

I'm trying to add an option that will allow us to lower or uppercase
the column headers we create by calling ftell on the Excel stream but
when I do something like...

$xls = fopen("xlsfile://../data/measurables.xls","wb"); echo ftell($xls);

....I get 0 returned even though I've hard coded a return of 123 in my
stream_tell function (which I did to see if my stream_tell was even
being called).

Can anyone tell me what I'm doing wrong or suggest another way to
"communicate" into the stream wrapper that will be compatible with PHP
4 and 5 on OSX, Linux and Windows?

Thanks

Matt
From: Rene Veerman on
>http://www.bettina-attack.de/jonny/view.php/projects/php_writeexcel/
>And, hey, when the hell will the PHP developers implement a foreach loop which assigns the array values by reference??

+100!




(still reading the rest)
From: Rene Veerman on
just curious, why did you choose to use it from behind a stream wrapper?

and sry, i have no exp with these beasts..


On Sun, Feb 21, 2010 at 11:03 PM, Matt Neimeyer <matt(a)neimeyer.org> wrote:
> I created a stream wrapper around the php_writeexcel library found at
> http://www.bettina-attack.de/jonny/view.php/projects/php_writeexcel/
>
> My code can be seen at http://www.pastebin.com/m7212eaa2
>
> I'm trying to add an option that will allow us to lower or uppercase
> the column headers we create by calling ftell on the Excel stream but
> when I do something like...
>
>   $xls = fopen("xlsfile://../data/measurables.xls","wb"); echo ftell($xls);
>
> ...I get 0 returned even though I've hard coded a return of 123 in my
> stream_tell function (which I did to see if my stream_tell was even
> being called).
>
> Can anyone tell me what I'm doing wrong or suggest another way to
> "communicate" into the stream wrapper that will be compatible with PHP
> 4 and 5 on OSX, Linux and Windows?
>
> Thanks
>
> Matt
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
From: "Ford, Mike" on


> -----Original Message-----
> From: Rene Veerman [mailto:rene7705(a)gmail.com]
> Sent: 22 February 2010 09:09
>
> >http://www.bettina-
> attack.de/jonny/view.php/projects/php_writeexcel/
> >And, hey, when the hell will the PHP developers implement a foreach
> loop which assigns the array values by reference??

Uh... s/when will/when did/

PHP 5 -- see www.php.net/foreach


Cheers!

Mike

--
Mike Ford,
Electronic Information Developer, Libraries and Learning Innovation,
Leeds Metropolitan University, C507, Civic Quarter Campus,
Woodhouse Lane, LEEDS,  LS1 3HE,  United Kingdom
Email: m.ford(a)leedsmet.ac.uk
Tel: +44 113 812 4730




To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm
From: Matt Neimeyer on
Basically... I built the stream encapsulation to do two things for me:

1. Keep track of the row I was on.
2. Keep track of the columns by name. So if I wrote columns Foo, Bar,
Baz one time and Foo, Baz the next it would automatically keep the Baz
in column three the second time.

In other words, it makes it simple to just dump row after row of data
into it for exports and simple reports.

Matt

On Mon, Feb 22, 2010 at 4:14 AM, Rene Veerman <rene7705(a)gmail.com> wrote:
> just curious, why did you choose to use it from behind a stream wrapper?
>
> On Sun, Feb 21, 2010 at 11:03 PM, Matt Neimeyer <matt(a)neimeyer.org> wrote:
>> I created a stream wrapper around the php_writeexcel library found at
>> http://www.bettina-attack.de/jonny/view.php/projects/php_writeexcel/