ozlerhakan/poiji

support trimming over list

ashishchoksi opened this issue · 3 comments

I have a column in excel with value => "abc, pqr, xyz" (multiple spaces in between)

I am capturing it as a list in my POJO.

@ExcelCellName("col)
List col;

result = ["abc"," pqr"," xyz"] (multiple space included )

it would be great if we support trim over list also,
or if it is already here please tell me what option I need to set.

Thank you.

Hi @ashishchoksi ,

Thank you for your advice! We need to update

private Object castListValue(String value, String sheetName, int row, int col, Field field, PoijiOptions options) {

Feel free to create a PR if you want to contribute to Poiji :)

On the other hand, you can create your custom config class and change the current feature. e.g. https://github.com/ozlerhakan/poiji#feature-8

vaa25 commented

@ashishchoksi You can use PoijiOptions.PoijiOptionsBuilder.settings().addListDelimiter("\\s*,\\s*").build() to remove all spaces between delimiter and values

you can use Poiji 3.1.2 @ashishchoksi thanks!