Workbook workbook = new HSSFWorkbook();
for (int cnt=0; cnt<tests.size(); cnt++) {
setColumns(tests.get(cnt));
Sheet sheet = workbook.createSheet("Test " + cnt);
Row row = sheet.createRow(0);
int counter = 2; //A counter which is used to determine how many additional columns are needed.
createCell(workbook, row, 0, "Grupa", CellStyle.ALIGN_CENTER, CellStyle.VERTICAL_CENTER);
createCell(workbook, row, 1, "Indeks", CellStyle.ALIGN_CENTER, CellStyle.VERTICAL_CENTER);