Forum Discussion
To add more details, I import jxl library and use the associated classes to read/write to the excel file:
import jxl.Workbook;
import jxl.write.Label;
import jxl.write.WritableSheet;
import jxl.write.WritableWorkbook;
def project = context.testCase.testSuite.project //this line is commented in Test Engine, works only with local ReadyAPI
def project_path = context.expand(project.resourceRoot); //this line is commented in Test Engine, works only with local ReadyAPI
def excel_path = project_path + "\\Data\\XXXXX_E2E_Functional_003.xls"; //this line is commented in Test Engine, works only with local ReadyAPI
Workbook wb = Workbook.getWorkbook(new File(excel_path)); //when running in Test Engine, "excel_path" is replaced with "\\Data\\XXXXX_E2E_Functional_003.xls"
WritableWorkbook wwb = Workbook.createWorkbook(new File(excel_path), wb); //when running in Test Engine, "excel_path" is replaced with "\\Data\\XXXXX_E2E_Functional_003.xls"
Related Content
- 2 years ago
Recent Discussions
- 5 days ago
- 9 days ago