0

Hi,

I am trying to upload file and save data to DB.
IN File only 10 row and 5 column data.(normal sample data)
File has only 24.0 KB (24,576 bytes)

I am using..reader.php and oleread.php
to upload file

But It taking More than 650MB memory (681574400 bytes)

Is any other library Or method Which takes less memory to upload more data.

and compatible for xlsx and xls

How to solve this .Please guide me.

2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by diafol
0

Can't you save to csv and upload that and then extract the info and insert into the DB (single mysql query)?

Anyway, just had a Google - and came across this:

http://amiworks.co.in/talk/readingparsing-excel-spreadsheet-using-php/

I changed it a bit and it seems to work very well.

You may need to change:

$this->_ole =& new OLERead();

to

$this->_ole = new OLERead();

On line 124 of reader.php

Also the error code in oleread.inc can pop up an error (line 168). I got around this with a dirty fix:

Place this on line 33 of oleread.inc:

var $error = '';

That's really not right, but gives you an idea of how you could do it.

Edited by diafol: n/a

0

No.. bcoz most people uses xlsx /xls files.

But if it reduce memory i will try
Is it any conversion problem happen from xlsx /xls To CSV.?

Can you give me example so i will try using csv

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.