ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

¨Dºë²µ{¦¡

¨Dºë²µ{¦¡

·Q¯}ÀY,¤£ª¾¦p¦óºë²
Sub Json_split_Range()
Dim i As Integer
S = Range("A2")
arr = Split(S, "[")
Cells(3, 1) = arr(1)
ARR1 = Split(arr(1), ",")

ARR2 = Split(Trim(ARR1(0)), ":")
Cells(4, 1) = ARR2(1)
ARR2 = Split(Trim(ARR1(1)), ":")
Cells(4, 2) = ARR2(1)
ARR2 = Split(Trim(ARR1(2)), ":")
Cells(5, 1) = ARR2(1)
ARR2 = Split(Trim(ARR1(3)), ":")
Cells(5, 2) = ARR2(1)
ARR2 = Split(Trim(ARR1(4)), ":")
Cells(6, 1) = ARR2(1)
ARR2 = Split(Trim(ARR1(5)), ":")
Cells(6, 2) = ARR2(1)
End Sub

Sub Json_split_Range()
    Dim i As Integer
    Dim S As String
    Dim arr As Variant
    Dim ARR1 As Variant
    Dim ARR2 As Variant

    ' ¨ú±oÀx¦s®æ A2 ªº­È
    S = Range("A2").Value

    ' ¥ý±N¾ã­Ó JSON ¦r¦ê¤À³Î
    arr = Split(S, "[")
    Cells(3, 1).Value = arr(1)

    ' ±N JSON ¤¤ªº³r¸¹¤À¹j­È¤À³Î
    ARR1 = Split(arr(1), ",")

    ' °j°é¸ÑªR¨C­Ó¤À¹j­È¡A¨Ã¶ñ¤J¬ÛÀ³ªºÀx¦s®æ
    For i = 0 To UBound(ARR1)
        ARR2 = Split(Trim(ARR1(i)), ":")
        ' i °¸¼Æ®É©ñ¦b¥ª°¼Äæ¦ì¡A©_¼Æ®É©ñ¦b¥k°¼Äæ¦ì
        Cells(4 + Int(i / 2), 1 + (i Mod 2)).Value = ARR2(1)
    Next i
End Sub
¤@Å¥´NÀ´¡A¤@¬Ý´N·|¡A¤@°µ´N¿ù

TOP

        ÀR«ä¦Û¦b : ¤p¨Æ¤£°µ¡B¤j¨ÆÃø¦¨¡C
ªð¦^¦Cªí ¤W¤@¥DÃD