VBAでWEBAPIから取得したデータをExcelのシートに展開したいです。
下記のようなweb apiのデータをWEBから受信するところまではできたのですが
取得したデータをどのようにパース?分解、ループして展開すれば良いかわかりません。
---web api---
<ArrayOfstring xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<string>2015/05/01,A</string>
<string>2015/05/02,B</string>
<string>2015/05/03,C</string>
<string>2015/05/04,B</string>
<string>2015/05/05,A</string>
</ArrayOfstring>
--vba---
Dim targetURI
targetURI = "http://*****"
'HTTP GET
Set HttpReq = CreateObject("MSXML2.XMLHTTP")
HttpReq.Open "GET", targetURI, False
HttpReq.send (Null)
With CreateObject("MSXML2.XMLHTTP")
.Open "GET", targetURI, False
.send
Set oXML = .responseXML
restext = .responseText
End With
restextには下記のような文字列が入っていました。
["2015/05/01,A","2015/05/02,B","2015/05/03,C","2015/05/04,B","2015/05/05,A"]
これをExcelの5行、2列のデータに表示するにはどのようにすれば良いでしょうか。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/05/13 05:08