public static Object GetCellValue(JZDocument doc, Guid sheetID, String cellName) { if (doc != null) { foreach (JZSheet sheet in doc.Sheets) { if (sheet.ID == sheetID) { foreach (JZCell cell in sheet.Cells) { if (cell.Name == cellName) { return(cell.Value); } } } } } return(null); }
public static Object GetCellValueAndHasCell(JZDocument doc, Guid sheetID, String cellName, out bool HasCell) { HasCell = false; if (doc != null) { foreach (JZSheet sheet in doc.Sheets) { if (sheet.ID == sheetID) { foreach (JZCell cell in sheet.Cells) { if (cell.Name == cellName) { HasCell = true; return(cell.Value); } } } } } return(null); }