469,312 Members | 2,472 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,312 developers. It's quick & easy.

Out of memory error

296 100+
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
12 4355
Icecrack
174 Expert 100+
How Much Memory have you got in your computer?
Feb 12 '09 #2
KevinADC
4,059 Expert 2GB
Must be trying to read a file that is just too big. How big is bad.xls?
Feb 13 '09 #3
Icecrack
174 Expert 100+
@KevinADC
Thats what i was thinking
Feb 13 '09 #4
pankajit09
296 100+
@Icecrack
1 GB RAM of memory in my computer.
Feb 13 '09 #5
pankajit09
296 100+
@KevinADC

The files size is just 2.74 MB.
Feb 13 '09 #6
KevinADC
4,059 Expert 2GB
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
174 Expert 100+
Would this file be corrupted at all ?
Feb 15 '09 #8
pankajit09
296 100+
@Icecrack
The file is perfect.

If you want I can give you the file.
Feb 16 '09 #9
Icecrack
174 Expert 100+
i could test it, with the script you posted above see if i get the same error
Feb 16 '09 #10
pankajit09
296 100+
@Icecrack

Have you completed the testing ?
Feb 17 '09 #11
Icecrack
174 Expert 100+
It works all fine, check your Excel file i guess its corrupted.
Feb 18 '09 #12
pankajit09
296 100+
@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.

Similar topics

reply views Thread by Srijit Kumar Bhadra | last post: by
1 post views Thread by Attila.Rajmund.Nohl | last post: by
27 posts views Thread by George2 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.