Error:groovy.lang.MissingPropertyException: No such property: Workbook for class: Script1
Getting Below error for groovy script in SOUPUI 5.6.0
Error:groovy.lang.MissingPropertyException: No such property: Workbook for class: Script1
For Below script :
import jxl.*
import jxl.write.*
import groovy.json.*
String fileLocation = "H:\\Desktop\\mSSanity_SOAPUI Framework\\FMO mS_Automation_DataSheet_v1_UAT.xls"; // Change the file path.
def fileP = new File(fileLocation);
def workBook1 = Workbook.getWorkbook(fileP);
def sheet1 = workBook1.getSheet(0);
def rowsCount = sheet1.getRows();
context["rowsCount1"]=rowsCount-1;
context["sheet1"]=sheet1;
context["fileLocation"]=fileLocation;
context["pointing_URL"]=sheet1.getCell(1,rowsCount-1).getContents();
context["dme_URL"]=sheet1.getCell(2,rowsCount-1).getContents();
context["header_Auth"]=sheet1.getCell(3,rowsCount-1).getContents();
context["aft_val"]=sheet1.getCell(4,rowsCount-1).getContents();
context["httpvalue"]=sheet1.getCell(5,rowsCount-1).getContents();
context["sub_Context"]=sheet1.getCell(6,rowsCount-1).getContents();
context["Request_String"]=sheet1.getCell(7,rowsCount-1).getContents();