Hello,
I am reading an excel file and my cell contains content like - “A/B/C”
I need to seperate out the A, B, C into different records.
I was using a for loop which is working fine as a java code, but in streamsets it’s printing out only the last updated value i.e. C in case of the above example.
for(String item : splitCellData(cell, indexOfChange, cell.toString().length(), "/")){ ffileRecord.valued‘content’] = item; }
The split data function
def splitCellData(Cell cell, int startIndex, int endIndex, String regex){
String res = null;
res = cell.toString().substring(startIndex, endIndex);
String)] result = res.split(regex);
return result;
}