0
// Declaring the path of the Excel file with the name of the Excel file
String sPath = "E:\\Practice_space\\MyKDTTest\\src\\dataengine\\DataEngine.xlsx";
// Here we are passing the Excel path and SheetName as arguments to connect with Excel file
ExcelUtils.setExcelFile(sPath, "TestSteps");
上記のコードは私がJavaのメインクラスで述べたものです。私は事前にすでにタイプExcelUtilsのsetExcelFile(String、String)メソッドは未定義です
public static void setExcelFile(String Path,String SheetName) throws Exception {
FileInputStream ExcelFile = new FileInputStream(Path);
ExcelWBook = new XSSFWorkbook(ExcelFile);
ExcelWSheet = ExcelWBook.getSheet(SheetName);
}
しかし、私はエラーを取得していますが、私を助けてくださいとして怒鳴る他のクラスで定義されたメソッドsetExcelFile、感謝を呼び出しています
'setExcelFile'メソッドが' ExcelUtils'クラスにありますか? – ByeBye
このエラーは次のようなものですか:https://stackoverflow.com/questions/26034994/selenium-with-java-and-testng-test-login-with-excel-datasheet –
プロジェクトをクリアして再構築して問題を取り除く – Murthi