Exemplo n.º 1
0
 private void GetSheetRecords(List<SheetRecord> sheets, ref SstRecord sst, ref SheetRecord currentSheet, Record record)
 {
     SetSST(record, ref sst);
     SetSheets(sheets, record);
     currentSheet = SetIndex(sheets, currentSheet, record);
     SetRow(currentSheet, record);
     SetCell(currentSheet, record);
     SetMergeCells(currentSheet, record);
 }
Exemplo n.º 2
0
        public XLSRow(RowRecord record, SheetRecord sheet)
        {
            Cells = new Dictionary<uint, ICell>();
            foreach (var cell in sheet.Cells.Where(i => i.Row == record.RowNumber))
            {
                if (cell is LabelSstRecord)
                {
                    (cell as LabelSstRecord).SetValue(sheet.SST);
                }

                AddCell(cell);
            }
        }
Exemplo n.º 3
0
 private static void SetMergeCells(SheetRecord currentSheet, Record record)
 {
     if (record is MergeCellsRecord && currentSheet != null)
     {
         currentSheet.MergeCells.Add(record as MergeCellsRecord);
     }
 }
Exemplo n.º 4
0
 private static SheetRecord SetIndex(List<SheetRecord> sheets, SheetRecord currentSheet, Record record)
 {
     if (record is IndexRecord)
     {
         currentSheet = sheets.FirstOrDefault(i => i.Index == null);
         if (currentSheet != null)
             currentSheet.Index = record as IndexRecord;
     }
     return currentSheet;
 }
Exemplo n.º 5
0
 private static void SetRow(SheetRecord currentSheet, Record record)
 {
     if (record is RowRecord && currentSheet != null)
     {
         currentSheet.Rows.Add(record as RowRecord);
     }
 }
Exemplo n.º 6
0
 private static void SetCell(SheetRecord currentSheet, Record record)
 {
     if (record is CellRecord && currentSheet != null)
     {
         currentSheet.Cells.Add(record as CellRecord);
     }
 }