private static IWorkbook CreateWorkbook(SpreadsheetVersion excelVer) { return excelVer == SpreadsheetVersion.EXCEL97 ? new HSSFWorkbook() as IWorkbook : new XSSFWorkbook() ; }
public excel(SpreadsheetVersion excelVer) { _excelVer = excelVer; _excelExt = excelVer == SpreadsheetVersion.EXCEL97 ? "xls" : "xlsx"; }
private static void ConfirmCrInRange(bool expResult, String colStr, String rowStr, SpreadsheetVersion sv) { if (expResult == CellReference.CellReferenceIsWithinRange(colStr, rowStr, sv)) { return; } throw new AssertionException("expected (c='" + colStr + "', r='" + rowStr + "' to be " + (expResult ? "within" : "out of") + " bounds for version " + sv.ToString()); }