Exemplo n.º 1
0
 public void Clear()
 {
     using (var srcRows = _sheet.RowsUsed(true))
         foreach (var row in srcRows)
         {
             row.OutlineLevel = 0;
         }
     _sheet.Clear();
 }
Exemplo n.º 2
0
        private void MoveRange(MoveData moveData)
        {
            var srcRng = Sheet.Range(moveData.SourceAddress).Unsubscribed();

            _tempSheet.Clear();
            _tempSheet.Cell(1, 1).Value = srcRng;
            Sheet.Range(moveData.TargetAddress).Unsubscribed().Clear();
            Sheet.Cell(moveData.TargetAddress.FirstAddress).Value = _tempSheet.Range(1, 1, srcRng.RowCount(), srcRng.ColumnCount()).Unsubscribed();
            //TODO !!!Sheet.ConditionalFormats.Compress();
        }
Exemplo n.º 3
0
        private void MoveRange(MoveData moveData)
        {
            var srcRng = Sheet.Range(moveData.SourceAddress);

            _tempSheet.Clear();
            _tempSheet.Cell(1, 1).Value = srcRng;
            srcRng.Clear(XLClearOptions.AllContents);
            Sheet.Range(moveData.TargetAddress).Clear();
            Sheet.Cell(moveData.TargetAddress.FirstAddress).Value = _tempSheet.Range(1, 1, srcRng.RowCount(), srcRng.ColumnCount());
        }
Exemplo n.º 4
0
        public void Clear()
        {
            var srcRows = _sheet.RowsUsed(XLCellsUsedOptions.All);

            foreach (var row in srcRows)
            {
                row.OutlineLevel = 0;
            }
            _sheet.Clear();
        }
Exemplo n.º 5
0
        public void ClearWorksheet()
        {
            switch (Package)
            {
            case ExcelPackage.ClosedXml:
                _closedXMLWorksheet.Clear();
                break;

            default:
                _interopWorksheet.Cells.Clear();
                break;
            }
        }