如何查找从网页粘贴到Excel表的RowCount
即时通讯从下面的代码excel接收一个表格
With ActiveSheet.QueryTables.Add(Connection:= _ "URL;some url") .WebSelectionType = "xlSpecifiedTables" .WebTables = "10" .BackgroundQuery = True .TablesOnlyFromHTML = True .Refresh BackgroundQuery:=False .SaveData = True End With
但我也想从那个表中得到行数。 所以我怎么能达到呢?
With ActiveSheet.QueryTables.Add(Connection:= _ "URL;some url") .LineCount 'is it smt like this??????? End With
为什么不简单地使用Range("B3").CurrentRegion.Rows.Count
?
请注意,在下载它们之前,您无法知道要下载的#行,因为您正在使用.BackgroundQuery = True
,所以您不知道下载何时完成。