将 Public Overrides Function PerformUndoAction(ByVal sender As Object) As Boolean
Dim spreadView As FarPoint.Win.Spread.SpreadView = Nothing
If TypeOf sender Is FarPoint.Win.Spread.SpreadView Then
spreadView = CType(sender, FarPoint.Win.Spread.SpreadView)
Else
Return False
End If
If sheetView Is Nothing Then
sheetView = spreadView.GetSheetView
End If
If (SaveUndoState()) And Not (sheetView Is Nothing) Then
sheetView.ClearRange(cellRange.Row, cellRange.Column, cellRange.RowCount, cellRange.ColumnCount, False)
Return True
End If
Return False
End Function
将这个函数中“ sheetView.ClearRange(cellRange.Row, cellRange.Column, cellRange.RowCount, cellRange.ColumnCount, False)
”改为循环设置Cell.text=""就可以了 |