ªð¦^¦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 : ¡i¥Í©R¦b©I§l¶¡¡j¦òªû»¡¡G¡u¥Í©R¦b©I§l¶¡¡C¡v¤HµLªkºÞ¦í¦Û¤vªº¥Í©R¡A§óµLªk¾×¦í¦º´Á¡AÅý¦Û¤v¥Ã¦í¤H¶¡¡C¬JµM¥Í©R¥h¨Ó³o»òµL±`¡A§Ú­Ì§óÀ³¸Ó¦n¦n¦a·R±¤¥¦¡B§Q¥Î¥¦¡B¥R¹ê¥¦¡AÅý³oµL±`¡BÄ_¶Qªº¥Í©R¡A´²µo¥¦¯uµ½¬üªº¥ú½÷¡A¬M·Ó¥X¥Í©R¯u¥¿ªº»ù­È¡C
ªð¦^¦Cªí ¤W¤@¥DÃD