How to read bulk data dynamically via excel

Say, registering to flipkart site,  i have to read all the values via excel.i am using two for loops for reading row and cell num automatically,without hardcoding the same. But a exception occurred i.e

Cannot get a text value from a numeric cell………how to handle this exception!!

Train Asked on April 14, 2017 in Selenium WebDriver.
Add Comment
  • 3 Answer(s)

    this will work.. try it out


    File f= new File(filepath);
    FileInputStream fis= new FileInputStream(f);
    Workbook wb = WorkbookFactory.create(fis);
    Sheet st = wb.getSheet(sheetname);
    Row r = st.getRow(rowIndex);
    Cell c = r.getCell(cellIndex);
    data = c.toString();

    Supporter Answered on April 17, 2017.
    Add Comment

    Hi, I was using the two loops for reading and cell coding without using the coding too much.For learning these loops, join in Selenium Training in Chennai.

    Default Answered on April 17, 2017.
    Add Comment

    Change the cell type to TEXT, by right clicking on the cell. By default Excel treat the cell type based on the value entered.

    Default Answered on May 2, 2017.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.