Results 1 to 3 of 3
  1. #1
    wanw84 is offline Member
    Join Date
    Oct 2008
    Posts
    2
    Rep Power
    0

    Default help in reading file.

    Hi.

    Here's my problem.

    I want to read excel file. The size is 50 by 50.
    Now the problem is i want to select a portion from the excel table.
    How I want to select the first 10 row and 10 columns and put it in vector
    [a b c d e f g h i j] => first row
    [a b c d e f g h i j] => second row
    [a b c d e f g h i j] => third row
    .
    .
    .
    [a b c d e f g h i j] => tenth row

    thanks in advance

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  3. #3
    jack239 is offline Member
    Join Date
    Jul 2008
    Posts
    35
    Rep Power
    0

    Default

    You can use Jakarta POI HSSF API to read or write any MS format excel sheet. See the code snippet below-

    To get a row- HSSFRow excelrow = sheet.getRow(0);
    To get a cell: HSSFCell cell = excelrow.getCell((short)1); etc.
    New to Java/PHP/Javascript development?
    For free help go to- www.techcubetalk.com

Similar Threads

  1. Help reading file
    By fritz1474 in forum New To Java
    Replies: 4
    Last Post: 09-17-2008, 03:28 AM
  2. reading csv file help
    By fritz1474 in forum New To Java
    Replies: 5
    Last Post: 09-04-2008, 08:41 PM
  3. Reading a file
    By mew in forum New To Java
    Replies: 2
    Last Post: 12-30-2007, 12:23 PM
  4. Reading a file for use
    By peachyco in forum New To Java
    Replies: 2
    Last Post: 11-27-2007, 03:49 AM
  5. Reading from a file
    By leebee in forum New To Java
    Replies: 1
    Last Post: 07-23-2007, 12:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •