What is this strange looking block after else in this code ???
try
{
if (ossdSpreadSheet == null)
psErrorMessage = "Spread sheet document not created, cannot proceed!";
else if (oXMLWriter == null)
psErrorMessage = "Add new sheet first before writing to sheet of workbook!";
{
oXMLWriter.WriteStartElement(new Row());
bValid = true;
}
return bValid;
}
catch (Exception ex)
{
psErrorMessage = ex.Message;
return false;
}
I suppose it is a static block, but what is it's use ?