public ExcelCell(ExcelRow row, CellEntry entry) { _entry = entry; _row = row; if (null != entry) { Column = entry.Column; Row = entry.Row; decimal val; if (ApiUtils.TryDecimalParse(entry.NumericValue, out val)) { Value = val; } } }
public void Parse() { Title = _entry.Title.Text; CellQuery cellQuery = new CellQuery(_entry.CellFeedLink); CellFeed cellFeed = _service.Query(cellQuery); _cellFeed = cellFeed; Dictionary<uint, List<CellEntry>> groupRows = new Dictionary<uint, List<CellEntry>>(); foreach (CellEntry cell in cellFeed.Entries) { if (!groupRows.ContainsKey(cell.Row)) { groupRows[cell.Row] = new List<CellEntry>(); } groupRows[cell.Row].Add(cell); } string category = ""; foreach (KeyValuePair<uint, List<CellEntry>> row in groupRows) { ExcelRow excelRow = new ExcelRow(this,row.Key, row.Value); Rows.Add(excelRow); excelRow.Parse(ref category); } foreach (ExcelRow excelRow in Rows) { if (!string.IsNullOrEmpty(excelRow.OriginalCategory)) { excelRow.Category = ExcelRow.GetNewCategory(excelRow.OriginalCategory, excelRow.Name); } } }