Beispiel #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);
 }
Beispiel #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);
            }
        }
Beispiel #3
0
 private static void SetMergeCells(SheetRecord currentSheet, Record record)
 {
     if (record is MergeCellsRecord && currentSheet != null)
     {
         currentSheet.MergeCells.Add(record as MergeCellsRecord);
     }
 }
Beispiel #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;
 }
Beispiel #5
0
 private static void SetRow(SheetRecord currentSheet, Record record)
 {
     if (record is RowRecord && currentSheet != null)
     {
         currentSheet.Rows.Add(record as RowRecord);
     }
 }
Beispiel #6
0
 private static void SetCell(SheetRecord currentSheet, Record record)
 {
     if (record is CellRecord && currentSheet != null)
     {
         currentSheet.Cells.Add(record as CellRecord);
     }
 }