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
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.