Ejemplo n.º 1
0
        public void AddEntry(List <object> values)
        {
            ExcelSheet.MoveTo(
                UpperLeftRow + (_orientation == TableOrientation.RowHeaders ? 0 : NumEntries + 1),
                UpperLeftColumn + (_orientation == TableOrientation.ColumnHeaders ? 0 : NumEntries + 1)
                );

            for (var idx = 0; idx < (values.Count > NumHeaders ? values.Count : NumHeaders); idx++)
            {
                if (idx < values.Count)
                {
                    ExcelSheet.ActiveCell.SetValue(values[idx]);
                }

                ExcelSheet.Move(
                    _orientation == TableOrientation.RowHeaders ? 1 : 0,
                    _orientation == TableOrientation.ColumnHeaders ? 1 : 0
                    );
            }

            NumEntries++;

            ExcelSheet.Move(
                _orientation == TableOrientation.RowHeaders ? -values.Count : 0,
                _orientation == TableOrientation.ColumnHeaders ? -values.Count : 0
                );
        }
Ejemplo n.º 2
0
        public void AddHeader(string header)
        {
            ExcelSheet.MoveTo(
                UpperLeftRow + (_orientation == TableOrientation.ColumnHeaders ? 0 : NumHeaders),
                UpperLeftColumn + (_orientation == TableOrientation.RowHeaders ? 0 : NumHeaders)
                );

            ExcelSheet.ActiveCell.SetCellValue(header);

            NumHeaders++;
        }