Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > jxl / java heap space error

Thread Tools

jxl / java heap space error

Posts: n/a

I've got a spreadsheet I'm trying to read in using the jxl api. My
spreadsheet is about 12 Mb (~200 columns x 6000 rows). My code can
read the spreadsheet, and can print a list of the worksheets using the

rawData = Workbook.getWorkbook(dataFile, wks);
String [] sheetNames = rawData.getSheetNames();

for(int i = 0; i<numberOfSheets; i++)
tools.out(sheetNames[i]); //print the sheet names

I then try to access the sheet I want

rawDataSheet = rawData.getSheet("Sheet1");

NVars = rawDataSheet.getColumns();
NRows = rawDataSheet.getRows();

System.out.println(NVars + " " + NRows);

I never get to the final print statemement. I've set the
WorkbookSettings as follows:

WorkbookSettings wks = new WorkbookSettings();

and I've edited my -Xms and -Xmx to the following:

-Xms4m -Xmx30m

I (and my colleagues) have got no idea what to do next! If anyone can
help, then they might stop my computer from being thrown out of the

Reply With Quote
Roedy Green
Posts: n/a
On Thu, 27 Mar 2008 03:06:33 -0700 (PDT), ChrisW <(E-Mail Removed)>
wrote, quoted or indirectly quoted someone who said :

>I never get to the final print statemement. I've set the
>WorkbookSettings as follows:

You are not getting an error message, right?

You can either pepper the code with debug statements to figure out
precisely where it is looping/hanging, or you can use the debugger in
your IDE to start tracing and seeing that it is doing.

Roedy Green Canadian Mind Products
The Java Glossary
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
error: package jxl does not exist Java 16 02-24-2013 11:08 PM
How to increase stack space/heap space Ajay C Programming 9 05-14-2006 12:50 AM
java.lang.OutOfMemoryError: Java heap space Java 2 05-08-2006 03:35 AM
jxl out of memory error alexjcasol Java 2 09-16-2005 09:07 AM
Stack space, global space, heap space Shuo Xiang C Programming 10 07-11-2003 07:30 PM