By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,933 Members | 1,686 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,933 IT Pros & Developers. It's quick & easy.

Out of memory error

100+
P: 296
The perl code is as below :
Expand|Select|Wrap|Line Numbers
  1.     use strict; 
  2.     use Spreadsheet::ParseExcel; 
  3.     my $parser = Spreadsheet::ParseExcel->new( 
  4.         CellHandler => \&cell_handler, 
  5.         NotSetCell  => 1 
  6.     ); 
  7.     my $workbook = $parser->Parse('bad.xls'); 
  8.     sub cell_handler { 
  9.         my $workbook    = $_[0]; 
  10.         my $sheet_index = $_[1]; 
  11.         my $row         = $_[2]; 
  12.         my $col         = $_[3]; 
  13.         my $cell        = $_[4]; 
  14.         print $cell->unformatted(), "\n"; 
  15.     } 

The system output(error) is as below:
D:\Perl\bin\search tool>perl testa.pl
UTF-16 surrogate 0xdb79 at D:/Perl/site/lib/Spreadsheet/ParseExcel/
FmtDefault.pm line 81.
UTF-16 surrogate 0xdbb1 at D:/Perl/site/lib/Spreadsheet/ParseExcel/
FmtDefault.pm line 81.
UTF-16 surrogate 0xd83e at D:/Perl/site/lib/Spreadsheet/ParseExcel/
FmtDefault.pm line 81.
UTF-16 surrogate 0xdff8 at D:/Perl/site/lib/Spreadsheet/ParseExcel/
FmtDefault.pm line 81.
UTF-16 surrogate 0xdbff at D:/Perl/site/lib/Spreadsheet/ParseExcel/
FmtDefault.pm line 81.
UTF-16 surrogate 0xdd98 at D:/Perl/site/lib/Spreadsheet/ParseExcel/
FmtDefault.pm line 81.
UTF-16 surrogate 0xd9bf at D:/Perl/site/lib/Spreadsheet/ParseExcel/
FmtDefault.pm line 81.
UTF-16 surrogate 0xdcd7 at D:/Perl/site/lib/Spreadsheet/ParseExcel/
FmtDefault.pm line 81.
UTF-16 surrogate 0xdde6 at D:/Perl/site/lib/Spreadsheet/ParseExcel/
FmtDefault.pm line 81.
UTF-16 surrogate 0xdabe at D:/Perl/site/lib/Spreadsheet/ParseExcel/
FmtDefault.pm line 81.
UTF-16 surrogate 0xdb71 at D:/Perl/site/lib/Spreadsheet/ParseExcel/
FmtDefault.pm line 81.
UTF-16 surrogate 0xd912 at D:/Perl/site/lib/Spreadsheet/ParseExcel/
FmtDefault.pm line 81.
UTF-16 surrogate 0xdab0 at D:/Perl/site/lib/Spreadsheet/ParseExcel/
FmtDefault.pm line 81.
Unicode character 0xfdde is illegal at D:/Perl/site/lib/Spreadsheet/
ParseExcel/FmtDefault.pm
UTF-16 surrogate 0xdc77 at D:/Perl/site/lib/Spreadsheet/ParseExcel/
FmtDefault.pm line 81.
substr outside of string at D:/Perl/site/lib/Spreadsheet/ParseExcel.pm
line 1015.
Use of uninitialized value in length at D:/Perl/site/lib/Spreadsheet/
ParseExcel.pm line 1951.
Use of uninitialized value $sTxt in unpack at D:/Perl/site/lib/
Spreadsheet/ParseExcel/FmtDefa
substr outside of string at D:/Perl/site/lib/Spreadsheet/ParseExcel.pm
line 1020.
UTF-16 surrogate 0xdeec at D:/Perl/site/lib/Spreadsheet/ParseExcel/
FmtDefault.pm line 81.
UTF-16 surrogate 0xdd7e at D:/Perl/site/lib/Spreadsheet/ParseExcel/
FmtDefault.pm line 81.
substr outside of string at D:/Perl/site/lib/Spreadsheet/ParseExcel.pm
line 1196.
Use of uninitialized value in unpack at D:/Perl/site/lib/Spreadsheet/
ParseExcel.pm line 1196.
substr outside of string at D:/Perl/site/lib/Spreadsheet/ParseExcel.pm
line 1196.
Use of uninitialized value in unpack at D:/Perl/site/lib/Spreadsheet/
ParseExcel.pm line 1196.
Out of memory!



The system information is as below :
Perl version : 5.010000
OS name : MSWin32
Module versions: (not all are required)
Spreadsheet::ParseExcel 0.49
Scalar::Util 1.19
Unicode::Map (not installed)
Spreadsheet::WriteExcel (not installed)
Parse::RecDescent (not installed)
File::Temp 0.18
OLE::Storage_Lite 0.18
IO::Stringy 2.110
Feb 12 '09 #1
Share this Question
Share on Google+
12 Replies


Icecrack
Expert 100+
P: 174
How Much Memory have you got in your computer?
Feb 12 '09 #2

KevinADC
Expert 2.5K+
P: 4,059
Must be trying to read a file that is just too big. How big is bad.xls?
Feb 13 '09 #3

Icecrack
Expert 100+
P: 174
@KevinADC
Thats what i was thinking
Feb 13 '09 #4

100+
P: 296
@Icecrack
1 GB RAM of memory in my computer.
Feb 13 '09 #5

100+
P: 296
@KevinADC

The files size is just 2.74 MB.
Feb 13 '09 #6

KevinADC
Expert 2.5K+
P: 4,059
Sorry then , I have no idea why that little bit of code you posted returns an out of memory error.
Feb 13 '09 #7

Icecrack
Expert 100+
P: 174
Would this file be corrupted at all ?
Feb 15 '09 #8

100+
P: 296
@Icecrack
The file is perfect.

If you want I can give you the file.
Feb 16 '09 #9

Icecrack
Expert 100+
P: 174
i could test it, with the script you posted above see if i get the same error
Feb 16 '09 #10

100+
P: 296
@Icecrack

Have you completed the testing ?
Feb 17 '09 #11

Icecrack
Expert 100+
P: 174
It works all fine, check your Excel file i guess its corrupted.
Feb 18 '09 #12

100+
P: 296
@Icecrack

No the excel file is perfect.
Feb 18 '09 #13

Post your reply

Sign in to post your reply or Sign up for a free account.