It´s the same problem, the firts time that I executed the script show me RAW_XML_FILE_HEADER error, but the followings times, show me:
"java.langNoClassDefFoundError:Could not initialize class org.apache.poi.poifs.filesystem.Magic error at line 14"
import java.io.File;
import java.io.FileInputStream;
import java.util.Iterator;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
String filepath = "D:\\prueba_estila\\Parametros1.xlsx"
String sheetName = "Sheet1"
FileInputStream fis = new FileInputStream(new File(filepath))
Workbook wb = WorkbookFactory.create(fis)
Sheet sh = wb.getSheet(sheetName)
Iterator itrRow = sh.rowIterator()
while(itrRow.hasNext())
{
Row row = itrRow.next()
for(Cell cell : row)
{
switch(cell.getCellType())
{
case Cell.CELL_TYPE_NUMERIC:
log.info cell.getNumericCellValue()
break;
default:
log.info cell.getRichStringCellValue()
}
}
}
fis.close()
wb.close()
In Ready API 2.8.0 show me the error but in SOAPUI 5.2.1 does not show error
I´ve put the flowing libraries in ReadyAPI 2.8.0
poi-4.1.1.jar
poi-excelant-4.1.1.jar
poi-ooxml-4.1.1.jar
poi-ooxml-schemas-4.1.1.jar
poi-scratchpad-4.1.1.jar
Could be any library incompatible with READY APi2.8.0?