Forum Discussion

Ronald's avatar
Ronald
New Contributor
6 years ago

java.lang.IndexOutOfBoundsException: Index: 1, Size: 1

I have a Groovyscript to get data from an excel file in a soapui massage.   Groovy script: import com.eviware.soapui.model.*; import com.eviware.soapui.model.testsuite.Assertable; import com....
  • avidCoder's avatar
    6 years ago

    If you have only sheet available in Excel which is Sheet1. Then, obviously you will get this exception. Please change this to :-

    Sheet sheet = workbook.getSheetAt(0);

    Or if you want to menton the sheet name then use this code:-

    Sheet sheet = workbook.getSheet("Sheet1");

    Hope, this solved your problem.