Skip to content

Bug - Reader is reading last empty row and assigning default values to the fields in the POJO class. #32

@Sanjay-Gopala-Krishna

Description

@Sanjay-Gopala-Krishna

List<TestData> list = Reader.of(TestData.class) .from(new File("src/test/resources/files/testData.xlsx")) .sheet("Sheet1") .skipHeaderRow(true) .skipEmptyRows(true) .setRowNumber(6) .list(); list.forEach(System.out::println);

Output:
TestData(testcase=testcase2, browser=FIREFOX, name=Luke Morris, email=Luke_Morris174170915@hepmv.page, dob=1992-06-01, age=46, isMarried=false, phoneNumber=+919880876543, skills=[.net, html])
TestData(testcase=testcase3, browser=CHROME, name=Javier Appleton, email=Javier_Appleton2068435477@ckzyi.club, dob=1992-07-19, age=38, isMarried=true, phoneNumber=+919880879843, skills=[java, javascript])
TestData(testcase=testcase4, browser=CHROME, name=Scarlett Parsons, email=Scarlett_Parsons1644538906@1wa8o.media, dob=1991-11-26, age=43, isMarried=true, phoneNumber=+919812876543, skills=[html, css, react])
TestData(testcase=null, browser=null, name=null, email=null, dob=null, age=0, isMarried=false, phoneNumber=null, skills=null)

Reader is reading the last empty row after reading all the non-empty rows from the excel.
I tried even giving skipEmptyRows(true), but didn't work!!!

Can you please take a look:)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions