public void Clear() { using (var srcRows = _sheet.RowsUsed(true)) foreach (var row in srcRows) { row.OutlineLevel = 0; } _sheet.Clear(); }
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(); }
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()); }
public void Clear() { var srcRows = _sheet.RowsUsed(XLCellsUsedOptions.All); foreach (var row in srcRows) { row.OutlineLevel = 0; } _sheet.Clear(); }
public void ClearWorksheet() { switch (Package) { case ExcelPackage.ClosedXml: _closedXMLWorksheet.Clear(); break; default: _interopWorksheet.Cells.Clear(); break; } }