Forum Discussion
Department_of_T
12 years agoContributor
I get this error when trying to read from the CreateOrg sheet
groovy.lang.MissingMethodException: No signature of method: java.lang.String.getSheet() is applicable for argument types: (java.lang.String) values: [CreateOrg] Possible solutions: getBytes(java.lang.String), getAt(java.lang.String), getBytes(), getChars(), getChars(), getBytes(java.nio.charset.Charset) error at line: 6
Also how do i define which column to start on? I want to start reading from C36
groovy.lang.MissingMethodException: No signature of method: java.lang.String.getSheet() is applicable for argument types: (java.lang.String) values: [CreateOrg] Possible solutions: getBytes(java.lang.String), getAt(java.lang.String), getBytes(), getChars(), getChars(), getBytes(java.nio.charset.Charset) error at line: 6
Also how do i define which column to start on? I want to start reading from C36
import org.codehaus.groovy.scriptom.ActiveXObject
def file = new File("O:\\Technology & Telecommunications\\Application Development\\Applications Integration & Implementation\\Testing Team\\Projects\\Australia Post\\7.5 New Temp Permit - Decision Tree.xls").canonicalPath
def xls = new ActiveXObject('Excel.Application')
def workbooks = xls.Workbooks
def workbook = workbooks.Open(file)
def sheet = file.getSheet("CreateOrg");
def source = testRunner.testCase.getTestStepByName("CreateOrgValidations DataSource")
def thiscolumn
for(i=36;i<76;i++){
thiscolumn = i as char
source.addProperty(sheet.Range(thiscolumn+"1").Value)
}
xls.Quit()
Scriptom.releaseApartment()