0

以下のコードを使用して、ExcelでWebからテーブルを受け取っています

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
4

1 に答える 1

2

のようなものを単純に使用しないのはなぜRange("B3").CurrentRegion.Rows.Countですか?
実際にダウンロードする前にダウンロードする # 行を知ることはできず、 を使用している.BackgroundQuery = Trueため、ダウンロードがいつ完了するかはわかりません...

于 2012-02-20T11:06:48.833 に答える