1

I have program that use Apache poi 3.5

public void UploadXLSX(File file, FileType fileType)
             {
        XSSFWorkbook workbook = null;
        XSSFSheet sheet = null;
        StringBuilder query = new StringBuilder();
        try {
            workbook = new XSSFWorkbook(new FileInputStream(file));
            sheet = workbook.getSheetAt(0);
            System.out
                    .println("sheet.getLastRowNum() : " + sheet.getLastRowNum()
                            + " First" + sheet.getFirstRowNum());
            XSSFRow row; // = sheet.getRow(2); // third row
            XSSFCell cell;// = row.getCell((short)3); // fourth cell

The application throw exception

java.lang.NoSuchMethodError: org.apache.poi.util.IOUtils.copy(Ljava/io/InputStream;Ljava/io/OutputStream;)V

any advice to how slove the exception

1
  • I got the same exception. It is fixed by using same version of poi and poi-ooxml Commented May 16, 2017 at 13:11

1 Answer 1

3

Looks like there also is an earlier version of POI on the classpath in which that method did not exist yet.

See if it helps - http://poi.apache.org/faq.html#faq-N10006

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.