Results 1 to 3 of 3
  1. #1
    sathishvegeta is offline Member
    Join Date
    Feb 2013
    Rep Power

    Default ERROE in apache Poi.jar pls help me

    This is code
    XML Code:
    import org.apache.poi.xssf.usermodel.XSSFCell;
    import org.apache.poi.xssf.usermodel.XSSFRow;
    import org.apache.poi.xssf.usermodel.XSSFSheet;
    import org.apache.poi.xssf.usermodel.XSSFWorkbook;
    public class PS
    public static void main(Strings args[])
    InputStream filename = new FileInputStream("D:/sathish/Example.xlsx");
    XSSFWorkbook wb= new XSSFWorkbook(filename);
    XSSFSheet sheet = wb.getSheetAt(0);
    XSSFRow row1 = sheet.getRow(0);
    XSSFCell a1= row1.getCell(0);
    		String a1val= a1.getStringCellValue();
    		XSSFCell a2= row1.getCell(1);
    		String a2val=a2.getStringCellValue();
    		XSSFCell a3= row1.getCell(2);
    		String a3val=a3.getStringCellValue();
    		System.out.println("A1: " + a1val);
    		System.out.println("B1: " + a2val);
    		System.out.println("C1: " + a3val);
    This is my error:
    Exception in thread "main" org.apache.poi.poifs .filesystem.officeXmlFileException:The supplied data appears to be Office 2007+Xml Your are calling the part of Poi that deals with ole2 office Documents. You need to call a different part of POI to process this data (Eg XSSF insted of HSSF)
    at<init><He aderBlock,java:131>

    and Iam using 3.8 beta4 version of jar file

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: ERROE in apache Poi.jar pls help me

    Moved from New to Java

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Rep Power

    Default Re: ERROE in apache Poi.jar pls help me

    Please post the full stack trace, not just part of it, and highlight the line in your code on which it is thrown.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Apache Ant 1.9.1
    By java software in forum Java Software
    Replies: 0
    Last Post: 05-26-2013, 10:11 AM
  2. Apache Ant 1.8.3
    By java software in forum Java Software
    Replies: 0
    Last Post: 03-16-2012, 05:36 PM
  3. org.apache.cxf
    By madhu_sushmi in forum Advanced Java
    Replies: 0
    Last Post: 03-05-2010, 07:00 PM
  4. Replies: 0
    Last Post: 11-15-2008, 08:29 AM
  5. Apache Ant 1.7.1
    By Java Tip in forum Java Software
    Replies: 0
    Last Post: 07-11-2008, 03:45 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