I tried out this approach: link
It works fine with csv file, but i need to do the same for .xls file
In java side
public StringBuilder columnsForCsv(){
StringBuilder result = new StringBuilder();
List<String> columns = new ArrayList<>();
columns.add("id");
columns.add("from");
columns.add("to");
for(String column : columns){
result.append(column + ",");
}
return result;
}
This code will create 3 different columns with name id
from
to
in csv file
but when when i tried out the same for .xls file. This doesn't work.
Is there any way to write data in xls file without using any external library.