on 04-24-2014 10:36 AM
I am trying to iterate through each element of the set and write each of them to an excel file? Can Somebody help me to achieve this?
Code snippet is:
Iterator<String> nameIterator = names.iterator();
for(int size = 0;size<names.size();size++){
row = mdm_lastLoginDate.createRow(size);
//cell = row.createCell(1);
while(nameIterator.hasNext()){
String setName = nameIterator.next();
cell = row.createCell(1);
cell.setCellValue(setName);
System.out.println("setName:->"+setName);
}
mdm_lastLoginDate.autoSizeColumn(size);
}
above code prints each element in the console but not getting each value in the excel file. I am only getting the last value.
Thanks & regards
Amita
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.