不需要临时变量。清楚Formula,Value仍然存在。- SheetView sv = fpSpread1.ActiveSheet;
- if (sv == null)
- return;
- FarPoint.Win.Spread.Model.CellRange[] cellrange = sv.GetSelections();
- foreach (CellRange range in cellrange)
- {
- for (int i = range.Row; i < range.RowCount; i++)
- {
- for (int j = range.Column; j < range.ColumnCount; j++)
- {
- sv.Cells[i, j].Formula = string.Empty;
- }
- }
- }
复制代码 |