Web lists-archives.com

Re: [PHP] Allowed memory size exhausted

On 12/10/15 03:38, Karl DeSaulniers wrote:
> If I could drop PHPExcel and use a better solution, I would.
> Don't know of any and no time to research. Unfortunately.

I work a lot with external data and CSV provides a nice way to sanitize
material before importing it. Only work with Excel if you need the
spreadsheet functions, but if you just need a set of data then export it
to an intermediate format.

One does have fun with dates and text, and comma's can often create
secondary 'fun', in which case using tabs as a separator, or ensuring
strings are wrapped in double quotes is an alternative, but importing
the file IS just a matter of reading it 'block by block' but only
processing it line at a time. Import process just does a raw dump, while
update will use some unique key and update a record already stored in
the database.

Lester Caine - G8HFL
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php