读取Excel数字单元格值

时间:2016-05-05 12:55:29

标签: java selenium-webdriver

当我读取excel数字单元格值时,我得到带小数的输出。例如:4110515268正在阅读4.110515268E9。帮助我!  这是我的代码: -

FileInputStream file = new FileInputStream(new File ("C:\\Documents and Settings\\Deepa\\Desktop\\AMC test cases1.xls")); 
 HSSFWorkbook workbook = new HSSFWorkbook(file);
 HSSFSheet sheet = workbook.getSheet("Clinic Basic info");
 WebElement creat_new_website =driver.findElement(By.className("createnew"));
 creat_new_website.click();

 driver.findElement(By.id("primaryno_m")).sendKeys(String.valueOf(sheet.getRow(13).getCell(4).getNumericCellValue()));

0 个答案:

没有答案