LoginSignup
0
0

More than 1 year has passed since last update.

BtoBPF API Response JSONをVBAでパーサー

Last updated at Posted at 2021-07-22

BtoBPF API responce JSONをVBAでパーサー | 備忘録 (。・_・。)ノ
より抜粋

Option Explicit
Private Sub VBA_JSON_TEST()
Dim Parse As Object
Dim i As Long
Dim j As Long
Dim strJson As String
    strJson = ""
    For i = 1 To Worksheets(1).Range("A1").End(xlDown).Row
        strJson = strJson & Worksheets(1).Cells(i, 1)
    Next i
    Set Parse = JsonConverter.ParseJson(strJson)
    Debug.Print Parse("result")
    Debug.Print Parse("jounal_frees")("jnl_free_code1")
    For i = 1 To Parse("invdata").Count
        Debug.Print Parse("invdata")(i)("inv_no")
        For j = 1 To Parse("invdata")(i)("banks").Count
            Debug.Print Parse("invdata")(i)("banks")(j)("depositor_name")
        Next j
        For j = 1 To Parse("invdata")(i)("details").Count
            Debug.Print Parse("invdata")(i)("details")(j)("item_aut_amount_d")
        Next j
    Next i
    Set Parse = Nothing
End Sub
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0