FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Upload xlsx /xls and save to DB using minimum memory?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Upload xlsx /xls and save to DB using minimum memory? [message #176242] Fri, 09 December 2011 18:49 Go to next message
Amit Prakash Pawar is currently offline  Amit Prakash Pawar
Messages: 10
Registered: October 2010
Karma: 0
Junior Member
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.
Re: Upload xlsx /xls and save to DB using minimum memory? [message #176245 is a reply to message #176242] Sat, 10 December 2011 10:06 Go to previous messageGo to next message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma: 0
Senior Member
On Fri, 09 Dec 2011 10:49:54 -0800, Amit Prakash Pawar wrote:

> 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.

My reader.php file is this:

<?php
echo "reader.php\n";
?>

My oleread.php file is this:

<?php
echo "oleread.php\n";
?>

You might now understand why your question in it's current form is
somewhat difficult to answer.

If you have an xls file of 10 rows and 5 columns, I suggest you save it
as a csv file, upload the csv file and write php to parse the csv file
into your database.

I don't know of any native php support for microsoft proprietary file
formats, and if you're using proprietary php add-ons, you need to speak
to the suppliers of those add-ons for help with your problem.

Rgds

Denis McMahon
Re: Upload xlsx /xls and save to DB using minimum memory? [message #176246 is a reply to message #176245] Sat, 10 December 2011 10:31 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
Denis McMahon wrote:
> On Fri, 09 Dec 2011 10:49:54 -0800, Amit Prakash Pawar wrote:
>
>> 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.
>
> My reader.php file is this:
>
> <?php
> echo "reader.php\n";
> ?>
>
> My oleread.php file is this:
>
> <?php
> echo "oleread.php\n";
> ?>
>
> You might now understand why your question in it's current form is
> somewhat difficult to answer.
>
> If you have an xls file of 10 rows and 5 columns, I suggest you save it
> as a csv file, upload the csv file and write php to parse the csv file
> into your database.
>
> I don't know of any native php support for microsoft proprietary file
> formats, and if you're using proprietary php add-ons, you need to speak
> to the suppliers of those add-ons for help with your problem.
>

it takes 650MB just to read even a null content Microsoft format,
obviously. :-)

> Rgds
>
> Denis McMahon
Re: Upload xlsx /xls and save to DB using minimum memory? [message #176257 is a reply to message #176246] Mon, 12 December 2011 18:09 Go to previous message
Amit Prakash Pawar is currently offline  Amit Prakash Pawar
Messages: 10
Registered: October 2010
Karma: 0
Junior Member
Hi,
Can you please guide me to read only
1000 row and 30 column from sheet 1?

On Dec 10, 3:31 pm, The Natural Philosopher <t...@invalid.invalid>
wrote:
> Denis McMahon wrote:
>> On Fri, 09 Dec 2011 10:49:54 -0800, Amit Prakash Pawar wrote:
>
>>> 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.
>
>> My reader.php file is this:
>
>> <?php
>> echo "reader.php\n";
>> ?>
>
>> My oleread.php file is this:
>
>> <?php
>> echo "oleread.php\n";
>> ?>
>
>> You might now understand why your question in it's current form is
>> somewhat difficult to answer.
>
>> If you have an xls file of 10 rows and 5 columns, I suggest you save it
>> as a csv file, upload the csv file and write php to parse the csv file
>> into your database.
>
>> I don't know of any native php support for microsoft proprietary file
>> formats, and if you're using proprietary php add-ons, you need to speak
>> to the suppliers of those add-ons for help with your problem.
>
> it takes 650MB just to read even a null content Microsoft format,
> obviously. :-)
>
>
>
>
>
>
>
>> Rgds
>
>> Denis McMahon
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Edit a record?
Next Topic: Blogs
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 10:03:47 GMT 2024

Total time taken to generate the page: 0.02968 seconds