spring-projects / spring-batch-extensions

Spring Batch Extensions
242 stars 258 forks source link

Add readOnly boolean on PoiItemReader #128

Closed EXAXL closed 3 months ago

EXAXL commented 5 months ago

Using as-is PoiItemReader implementation force to rewrite each time input file. Sometime you don't need it/you can not do it (in our case we can not edit a file put on a nfs).

It could be nice adding a boolean field if the workbook has to be in readOnly mode or not. In the current implementation it is always force to false

mdeinum commented 3 months ago

I wonder if this wouldn't just be a sensible default in the first place. The reader should only read the file not modify it. So we could argue here that we just always should open it in read-only mode. I don't expect any problems if we do so.