instead of
HSSFRow firstrow= sheet.getRow(0);
firstrow.getcell(0).setcellvalue("Actual");
you should use
HSSFRow firstrow= sheet.getRow(0); // or sheet.createRow(0) if you didn't have row at 0(null pointer here)
firstrow.createCell(0).setcellvalue("Actual");