A friend of mine showed me this piece of code, gathered from a project he was working on:

	else
				{
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
					row.createCell((short)col++).setCellValue("");
				}

Guess for loops weren’t invented when this stuff was written…

Advertisement