2017-05-24 48 views
0

在關鍵字驅動的框架中,我無法從Excel中讀取數據。路徑和圖紙名稱從另一個類傳遞。同時調試Workbook對象得到空值。請幫助我。下面在selenuim中,keyworddriven框架工作無法讀取excel

public Sheet setExcelFile(String Path,String SheetName) throws Exception 
{ 
    File file = new File(Path); 
    FileInputStream inputStream = new FileInputStream(file); 
    Workbook workbook = null; 
    workbook = new XSSFWorkbook(inputStream); 
    Sheet sheet = workbook.getSheet(SheetName); 
    return sheet;  
} 

回答

0

代碼被賦予通過this鏈接進入第一,讓我知道在任何問題時