jxl / java heap space error

Discussion in 'Java' started by ChrisW, Mar 27, 2008.

  1. ChrisW

    ChrisW Guest

    HI,

    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
    following:

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

    for(int i = 0; i<numberOfSheets; i++)
    {
    tools.out(sheetNames); //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();
    wks.setInitialFileSize(30000000);
    wks.setArrayGrowSize(6000000);

    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
    window ;)

    Thanks,
    Chris
    ChrisW, Mar 27, 2008
    #1
    1. Advertising

  2. ChrisW

    Roedy Green Guest

    On Thu, 27 Mar 2008 03:06:33 -0700 (PDT), ChrisW <>
    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
    http://mindprod.com
    Roedy Green, Mar 28, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. alexjcasol

    jxl out of memory error

    alexjcasol, Sep 16, 2005, in forum: Java
    Replies:
    2
    Views:
    3,356
    Roedy Green
    Sep 16, 2005
  2. Shuo Xiang

    Stack space, global space, heap space

    Shuo Xiang, Jul 9, 2003, in forum: C Programming
    Replies:
    10
    Views:
    2,885
    Bryan Bullard
    Jul 11, 2003
  3. Christian Seberino
    Replies:
    21
    Views:
    1,650
    Stephen Horne
    Oct 27, 2003
  4. Ajay

    How to increase stack space/heap space

    Ajay, May 11, 2006, in forum: C Programming
    Replies:
    9
    Views:
    550
  5. Replies:
    16
    Views:
    862
    Arne Vajhøj
    Feb 24, 2013
Loading...

Share This Page