|
- Sub test1()
- Dim oDom As Object, oWin As Object
- Dim ar() As String, br, i As Long, j As Long
- Set oDom = CreateObject("HtmlFile")
- Set oWin = oDom.parentWindow
- br = Array("project", "code", "date")
- oWin.execScript "var db=" & Range("A1").Value & ";r=db.length-1;"
- ReDim ar(oWin.r, UBound(br))
- For i = 0 To UBound(ar)
- For j = 0 To UBound(br)
- ar(i, j) = oWin.eval("db[" & i & "]['" & br(j) & "']")
- Next
- Next
- With Range("D1")
- .CurrentRegion.ClearContents
- .Resize(, j) = br
- .Offset(1).Resize(i, j) = ar
- End With
- Set oWin = Nothing
- Set oDom = Nothing
- Beep
- End Sub
复制代码 |
评分
-
2
查看全部评分
-
|