Forum Discussion
abhishek813
14 years agoFrequent Contributor
Hi Henrik,
I am also facing the same problem and i am hoping you can help me out.
I am using jxl api to read an excel file and then do something with the values in the cell and it runs perfectly in soapUI but when i import the same script into loadUI's script runner component i get the "Cannot set property 'binding' on null object" error.
I have copied the jxl jar file in loadUI/ext folder.
Sorry for posting in an old post. Your suggestions will be really helpful.
Thanks
-Abhishek
I am also facing the same problem and i am hoping you can help me out.
I am using jxl api to read an excel file and then do something with the values in the cell and it runs perfectly in soapUI but when i import the same script into loadUI's script runner component i get the "Cannot set property 'binding' on null object" error.
I have copied the jxl jar file in loadUI/ext folder.
Sorry for posting in an old post. Your suggestions will be really helpful.
Thanks
-Abhishek
import jxl.*;
Workbook wb;
Sheet sh;
int rCount, randomInt;
wb = Workbook.getWorkbook(new File("somespreashseet.xls"));
sh = wb.getSheet(0);
rCount = sh.getRows();
//get random value
randomInt = new Random().nextInt(rCount-1)+1;
S = sh.getCell(0, randomInt).getContents();
T = sh.getCell(1, randomInt).getContents();
tr = sh.getCell(2, randomInt).getContents();
cl = sh.getCell(3, randomInt).getContents();
ac = sh.getCell(4, randomInt).getContents();
ev = sh.getCell(5, randomInt).getContents();
wi = sh.getCell(6, randomInt).getContents();
ga = sh.getCell(7, randomInt).getContents();
am = sh.getCell(8, randomInt).getContents();
wi = sh.getCell(9, randomInt).getContents();
re = sh.getCell(10, randomInt).getContents();
wd = sh.getCell(11, randomInt).getContents();
vd = sh.getCell(12, randomInt).getContents();
pl = sh.getCell(13, randomInt).getContents();
gr = sh.getCell(14, randomInt).getContents();
pu = sh.getCell(15, randomInt).getContents();
re = sh.getCell(16, randomInt).getContents();
la = sh.getCell(17, randomInt).getContents();
nu = sh.getCell(18, randomInt).getContents();
fr = sh.getCell(19, randomInt).getContents();
qu = sh.getCell(20, randomInt).getContents();
wb.close();
//do something with the values