473,382 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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

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

Similar topics

0
by: Srijit Kumar Bhadra | last post by:
Hello, Here is some sample code with pywin32 build 203 and ctypes 0.9.6. Best regards, /Srijit File: SharedMemCreate_Mutex_win32all.py # This application should be used with...
1
by: Attila.Rajmund.Nohl | last post by:
Hello! I'm using KAI C++ Compiler (KCC) Version 4.0d on Sparc Solaris 8 with Sun WorkShop 6 update 2 backend (KCC compiles C++ code to C than uses the Sun compiler to produce machine...
6
by: Andrzej | last post by:
Used to read newsgroup for answers, now have to ask for them as well. I have an application (C#, .NET 1.1) that connects to local db on MSDE 2000 SP3a (using ADO from MDAC 2.71) on one side and...
25
by: Zeng | last post by:
I finally narrowed down my code to this situation, quite a few (not all) of my CMyClass objects got hold up after each run of this function via the simple webpage that shows NumberEd editbox. My...
4
by: Sean Shanny | last post by:
To all, Running into an out of memory error on our data warehouse server. This occurs only with our data from the 'September' section of a large fact table. The exact same query running over...
2
by: saran | last post by:
I am having a problem with MySQL consuming a lot of memory and eventually throwing an Out of Memory error and restarting itself. The symptoms are that swap usage continues to rise until some...
6
by: tgnelson85 | last post by:
Hello, C question here (running on Linux, though there should be no platform specific code). After reading through a few examples, and following one in a book, for linked lists i thought i would...
5
by: kumarmdb2 | last post by:
Hi guys, For last few days we are getting out of private memory error. We have a development environment. We tried to figure out the problem but we believe that it might be related to the OS...
27
by: George2 | last post by:
Hello everyone, Should I delete memory pointed by pointer a if there is bad_alloc when allocating memory in memory pointed by pointer b? I am not sure whether there will be memory leak if I do...
2
by: ravishi | last post by:
Well, this is my first topic at this forum and I'm a newbie on C programming too. I'm coding a little program and I've used some "dynamic arrays" on it. Compiling and running the program on Linux...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.