public void SaveValueToExcel(NH_SheetCell one) { if (one == null) { return; } SaveValueToExcel(one.rowIndex, one.columnIndex, one.val); }
public void SaveValueToCache(int rowIndex, int columnIndex, object val) { if (val == null) { return; } NH_SheetCell ncell = GetNCell(rowIndex, columnIndex); if (ncell == null) { ncell = NH_SheetCell.NewCell(this, rowIndex, columnIndex); m_tableList.Add(ncell); } ncell.val = val; }
void OnInit() { if (this.m_sheet.IsActive) { this.maxRow = this.m_sheet.LastRowNum + 1; this.maxCol = this.m_sheet.GetRow(0).LastCellNum; NH_SheetCell tmpCell = null; for (int i = 0; i < this.maxRow; i++) { for (int j = 0; j < this.maxCol; j++) { tmpCell = NH_SheetCell.NewCell(this, i, j); m_tableList.Add(tmpCell); } } m_tableList.Sort(_sort); } }
public NH_SheetCell GetNCell(int rowIndex, int columnIndex) { if (m_tableList.Count <= 0) { return(null); } int lens = m_tableList.Count; NH_SheetCell tmpCell = null; for (int i = 0; i < lens; i++) { tmpCell = m_tableList[i]; if (rowIndex == tmpCell.rowIndex && columnIndex == tmpCell.columnIndex) { return(tmpCell); } } return(null); }
public List <NH_SheetCell> GetNRows(int rowIndex) { if (m_tableList.Count <= 0) { return(null); } int lens = m_tableList.Count; List <NH_SheetCell> ret = new List <NH_SheetCell>(); NH_SheetCell tmpCell = null; for (int i = 0; i < lens; i++) { tmpCell = m_tableList[i]; if (tmpCell.rowIndex == rowIndex) { ret.Add(tmpCell); } } return(ret); }