以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  删除表中的空行,如何写代码  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=101225)

--  作者:有点蓝
--  发布时间:2017/5/26 22:55:00
--  
For i As Integer = Tables("表A").Rows.Count - 1 To 0 Step -1
    Dim r As Row = Tables("表A").Rows(i)
    Dim notnull As Boolean = False
    For Each c As Col In Tables("表A").Cols
        If r.IsNull(c.Name) = False Then
            notnull = True
            Exit For
        End If
    Next
    If notnull = False Then r.Delete
Next