public static bool TestExcelType(Object obj) { if (!(obj is object[, ])) { if (obj is ExcelError || ExcelUtil.isEQError(obj)) { return(false); } } else { foreach (Object o in (object[, ])obj) { if (o is ExcelError || ExcelUtil.isEQError(o)) { return(false); } } } return(true); }