最后一句代码,不要加上
With Tables("weixindanhao.weixin") 'weixindanhao. For i As Integer = .BottomPosition To .TopPosition Step -1 .Rows(i).Delete() NextEnd With