I have a list of data in ArrayList which contains the heading as well as the values associated with it. Like below,
Fruits
Apple
Orange
******
Vegetables
Beans
Carrot
Brinjal
Cucumber
******
Colors
Orange
Blue
Red
Green
Yellow
Now, I want to write the values in `excel` with each heading and the associated values in column-wise. Like below,
Fruits Vegetable Colors
Apple Beans Orange
Orange Carrot Blue
Brinjal Red
Cucumber Green
Yellow
I'm writing my code in java and using apache.poi.xssf.usermodel library, to handing the excel manipulations. The issue what I'm facing here is, when I'm writing the 2nd heading and the associated values, the first heading and its values are getting cleared due to the Row creation code
XSSFRow row = outputSheet.createRow(rowNumValue);
Can anyone help me get this done?