Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excel reader Skipping Empty Columns #319

Closed
IvanAtanasov opened this issue May 15, 2018 · 2 comments
Closed

Excel reader Skipping Empty Columns #319

IvanAtanasov opened this issue May 15, 2018 · 2 comments
Labels
Milestone

Comments

@IvanAtanasov
Copy link

The MsExcelRecordReader seems to be skipping empty columns, which to me is not the correct behaviour.

e.g.

Given an excel file like this

col1 col2 col3
1 3
1 2 3

When reading using code like this..

Job job = new JobBuilder()
    .named("test job")
    .reader(new MsExcelRecordReader(new File("/path-to-file.xlsx")))
    .mapper(new MsExcelRecordMapper<>(MyPojo.class, "col1", "col2", "col3"))
    .filter(new HeaderRecordFilter())
    .writer(new StandardOutputRecordWriter())
    .build();

For the first data row the pojo will have col2 field set as the value from the third column (3) as the second column has been skipped.

Is this expected behaviour?

I'm using version 5.2.0

Thanks,
Ivan

@fmbenhassine
Copy link
Member

That's a bug! Thank you for reporting this out 👍

Let me plan that for next release. Contributions are welcome!

Kr,
Mahmoud

@fmbenhassine
Copy link
Member

Fixed with #326 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants