There\'s a HashMap:
HashMap> matrix = new HashMap>();
I want to fil
In the inner for loop, keyCell never changes value. This means you are writing to the same cell value each time. (I'm surprised the code works at all due to this problem.)
for (String s : e.getValue()) {
if ((row - 5) < (e.getValue().size())) {
valueRow = worksheet.createRow(row += 1);
valueRow.createCell(keyCell).setCellValue(s);
} else {
valueRow.createCell(keyCell).setCellValue(s);
}
}
So first, I'd fix this problems and use keyCell++. If that doesn't work, add debugging showing the row and keyCell number each time you call createCell(). This will show if the indexes are following the correct pattern or not. You want the pattern: