这个用VBA代码吧。
代码如下(详见附件)
Sub test()
Dim reG As Object, rg As Range
Set reG = CreateObject("vbscript.regExp")
For Each rg In ActiveSheet.UsedRange
With reG
.Global = True
.Pattern = "\w"
rg.Value = .Replace(rg, "")
End With
Next
End Sub
这个用VBA代码吧。
代码如下(详见附件)
Sub test()
Dim reG As Object, rg As Range
Set reG = CreateObject("vbscript.regExp")
For Each rg In ActiveSheet.UsedRange
With reG
.Global = True
.Pattern = "\w"
rg.Value = .Replace(rg, "")
End With
Next
End Sub