Giter VIP home page Giter VIP logo

Comments (20)

mdeinum avatar mdeinum commented on May 8, 2024 1

Please don't use the Spring Batch Excel issues to discuss features in a different library. Either take that to that github repository or ask for feature improvements here.

from spring-batch-extensions.

Kyeiv avatar Kyeiv commented on May 8, 2024 1

corrected the issue

from spring-batch-extensions.

mminella avatar mminella commented on May 8, 2024

I left a note in the PR, but we can continue design discussions here. Instead of creating a whole new reader, why not take the approach of a decorator like the MultiResourceItemReader?

from spring-batch-extensions.

MichelinMan avatar MichelinMan commented on May 8, 2024

We have a use case for exactly this scenario. Is there a chance that the pull request for the proposed solution could be merged? Many thanks

from spring-batch-extensions.

xscorpio972 avatar xscorpio972 commented on May 8, 2024

Hello,

I didn't have time to implement the solution with the decorator.
I'll try to do it the next week, is it ok?

Thanks

2015-06-25 19:53 GMT+02:00 MichelinMan [email protected]:

We have a use case for exactly this scenario. Is there a chance that the
pull request for the proposed solution could be merged? Many thanks


Reply to this email directly or view it on GitHub
#17 (comment)
.

from spring-batch-extensions.

MichelinMan avatar MichelinMan commented on May 8, 2024

Thank you, that you be great!

from spring-batch-extensions.

almex avatar almex commented on May 8, 2024

I've already created my own implementation using Apache POI following the same idea you're exposing here :
https://github.com/almex/Raildelays/blob/master/batch/src/main/java/org/springframework/batch/item/file/ExcelSheetItemReader.java

from spring-batch-extensions.

Anbarasan93 avatar Anbarasan93 commented on May 8, 2024

Would it be possible to fix this issue?

from spring-batch-extensions.

karthickricky avatar karthickricky commented on May 8, 2024

i am facing issue with rowmapper. how to use rowmapper.

from spring-batch-extensions.

ahmedmokhtar97 avatar ahmedmokhtar97 commented on May 8, 2024

i'm facing this issue right now and found out that there's a PR opened with a solution for it since 2015,
so i was wondering when will it could be merged ?
thank you in advance
@benas

from spring-batch-extensions.

TechGrizzlee avatar TechGrizzlee commented on May 8, 2024

I've already created my own implementation using Apache POI following the same idea you're exposing here : https://github.com/almex/Raildelays/blob/master/batch/src/main/java/org/springframework/batch/item/file/ExcelSheetItemReader.java

We have tried to use your package and it's very helpful. Just not able to know how you can include a custom RowMapper. I see you have developed a be.raildelays.batch.bean.BatchExcelRowMapper to use ExchelSheetItemReader.

Is there any generic approach like org.springframework.batch.item.excel.mapping.BeanWrapperRowMapper where we can setTargetType as custom Model?

from spring-batch-extensions.

Kyeiv avatar Kyeiv commented on May 8, 2024

Hello, I don't know where to address this issue but thsi thread seems to be suitable. How is the work going with handling multiple excel sheets differently? I have noticed that this library's reader reads sheet for sheet, row by row.

from spring-batch-extensions.

mdeinum avatar mdeinum commented on May 8, 2024

It doesn't. Configure a different reader per sheet you want to read and limit the reading of rows/sheets for that reader.

from spring-batch-extensions.

Kyeiv avatar Kyeiv commented on May 8, 2024

Could you provide some more information how to do it? I am really sorry for that question, but i am new to spring batch. I know it isn't a place for such discussion so if you'd be so kind and write to me via email that is given in my description.

from spring-batch-extensions.

mdeinum avatar mdeinum commented on May 8, 2024

What I proposed is currently not possible, as we read the whole thing starting from sheet 1. We would need to enhance the readers to include something to specify which sheets to read. However, how should one specify this? A list if numbers to include, a range, a combination or something else? While it might seem easy it might not be as easy as it is at a first glance.

Currently the main usecase for Spring Batch Excel is reading a single sheet excel file, 1 file with multiple sheets isn't done that often (hence no mapping per sheet etc. will exist).

But if you want to have a way of specifying what to read, please open a new ticket for that so that we could make the configuration work to read the file multiple times with different mappings.

from spring-batch-extensions.

Kyeiv avatar Kyeiv commented on May 8, 2024

Created new issue, thanks.

#95

from spring-batch-extensions.

mdeinum avatar mdeinum commented on May 8, 2024

You created an issue for multiple sheets not reading a specific sheet(s).

As it is a niche to have 1 file with multiple sheets and mapped to different objects I'm not willing to implement that in the readers. As it also yields other issues with building steps etc.

from spring-batch-extensions.

Kyeiv avatar Kyeiv commented on May 8, 2024

You created an issue for multiple sheets not reading a specific sheet(s).

The issue title states "Need of reading one particular sheet or define mapping for every sheet". So I am aiming to read one sheet from the file for example passing ts name as parameter.

from spring-batch-extensions.

mdeinum avatar mdeinum commented on May 8, 2024

The issue is an or :). The latter we already concluded isn't going to happen. So the only thing is to read a particular sheet or sheets. Not sure if that should be by name or index, that is for another discussion.

from spring-batch-extensions.

mdeinum avatar mdeinum commented on May 8, 2024

The intent of the Excel readers is to map 1 row to 1 object. Trying to shoehorn this into 1 reader feels like adding much complexity for a niche functionality. For reading a file with multiple sheets you can use multiple steps and re-use parts of the configuration.

from spring-batch-extensions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.