Results 1 to 3 of 3

Thread: FileInputStream

  1. #1
    lakpathy is offline Member
    Join Date
    Jan 2011
    Posts
    2
    Rep Power
    0

    Post FileInputStream

    How to load an excel file and store the values of that file in an array.I have written a program but it is printing garbage values.It is as follows.

    import java.io.*;
    class FileDemo
    {
    public static void main(String[] ar) throws IOException
    {
    InputStream f=new FileInputStream("E://ex1.xlsx");
    n=f.available();
    byte b[]=new byte[n];
    f.read(b);
    for(int i=0;i<b.length;i++)
    System.out.println(b[i]);
    }
    }

    Here the excel file "ex1.xlsx" contains 2 shells with integer values .Please can U help me how to modify the code.....:rolleyes::(

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    10

    Default

    Google "POI HSSF" (or "POI XSSF" for Excel 2007 and later) or "Andy Khan JExcel", but I don't believe that one can handle Excel 2007 or later, at all.

  3. #3
    goldest's Avatar
    goldest is offline Senior Member
    Join Date
    Oct 2009
    Location
    Pune, India
    Posts
    469
    Rep Power
    6

    Wink

    I believe some good links have been provided to you in your previous similar post as well.

    Have you referred to the same : Here

    Goldest
    Java Is A Funny Language... Really!
    Click on * and add to member reputation, if you find their advices/solutions effective.

Similar Threads

  1. FileInputStream
    By lakpathy in forum New To Java
    Replies: 4
    Last Post: 01-17-2011, 01:00 PM
  2. FileInputStream Problems.
    By bayan in forum New To Java
    Replies: 18
    Last Post: 08-11-2010, 11:11 AM
  3. FileInputStream
    By pachufir in forum New To Java
    Replies: 3
    Last Post: 12-11-2009, 06:07 PM
  4. FileOutputStream > int > FileInputStream
    By dudejonne in forum New To Java
    Replies: 11
    Last Post: 11-11-2009, 05:03 PM
  5. Empty FileInputStream..
    By dudejonne in forum New To Java
    Replies: 5
    Last Post: 11-08-2009, 09:21 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
  •