FileOutputStream fos=null;
try {
fos=new FileOutputStream(fileLoc);
workBook.write(fos);
} catch(FileNotFoundException e){
throw new SwingObjectsException("error.common.closefile", ErrorSeverity.ERROR, null,
e, ExcelHelper.class,FileHelper.getFileNameFromPath(fileLoc));
}catch (Exception e) {
throw new SwingObjectsException("error.severe.SF001", ErrorSeverity.SEVERE, null, e, ExcelHelper.class);
}finally{
if(fos!=null){
try {
fos.close();
} catch (Exception e) {
throw new SwingObjectsException("error.severe.SF001", ErrorSeverity.SEVERE, null, e, ExcelHelper.class);
}
}
}
}