- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¬O¬°¤F¤è«K«ü©wAR°}¦C¤¤«ü©wªº¤¸¯À¡A¦b©ñ¶i·QnªºCELLS¤¤¶Ü?
¦pªGn§å¦¸§ä100È©ñ¶i¥h¶]¦^°é¡A¤¤¶¡¦³¿ùªº¸Ü
n©ñ on error resume next¶Ü¡H ¦^´_ 13# joey0415
¨S¿ù¬On©ñ¶i·QnªºCELLS.
¦pªG¹w´Á·|¦³¿ù»~ªºµ{¦¡½X¤§«e ¼g¤W on error resume next ,µ{¦¡´N¤@ª½°õ¦æ¤U¥h,¦p¯u¦³¿ù»~§A¬O·|¤£ª¾¹Dªº
¦^´_ 11# jewayy
- Option Explicit
- Option Base 1
- Sub ¤f³ø³æ³qÃö¬yµ{¬d¸ß()
- Dim ¥X¤f³ø³æ¸¹½X As String, Rng As Range, AR, S As Variant, E As Variant, i As Integer, W As String, II As Integer
- Dim Sh As Worksheet
- ¥X¤f³ø³æ¸¹½X = InputBox("¥X¤f³ø³æ¸¹½X", "¥X¤f³ø³æ©ñ¦æ¸ê®Æ¬d¸ß", "BE 02XE580024")
- If ¥X¤f³ø³æ¸¹½X = "" Then Exit Sub
- Set Sh = ActiveSheet
- '«ü©wÅã¥Ü¸ê®Æªº¤u§@ªí 'ActiveSheet->§@¥Î¤¤ªº¤u§@ªí
- Set Rng = Sh.Range("b2:B9, D3:D7, D9, B11, D11")
- '**AR¤º®e: °Ñ·Ó **** ¥X¤f³ø³æ³qÃö¬yµ{¬d¸ß(GB309) ºô¶ªºì©lÀÉ*****
- AR = Array("transTypeCd", "vslRegNo", "declNo", "brokerBoxNoName", "mawb", "hawb", "declType", "relCondSubCd" _
- , "soNo", "custCd", "carrierAgencyCd", "arrangeNo", "examMethod", "debitMark", "firstSendDate", "lastSendDate")
- With CreateObject("Microsoft.XMLHTTP")
- .Open "GET", "http://portal.sw.nat.gov.tw/APGQ/GB309!query?&choice=D&declNo=" & ¥X¤f³ø³æ¸¹½X, False
- .send
- S = Replace(.responsetext, """", "")
- End With
- i = 1
- '*********** ¬d¸ßµ²ªG *****
- For Each E In Rng
- E = ""
- If InStr(S, AR(i)) Then
- W = Mid(Split(Mid(S, InStr(S, AR(i)) + Len(AR(i))), ",")(0), 2)
- E = IIf(InStr(LCase(W), "null"), "", W)
- End If
- i = i + 1
- Next
- '***************³qÃö¬yµ{**********
- AR = Split(S, "data:[")(1) 'ÄdºI "data:[" «áªº¦r¦ê
- AR = Split(AR, "]")(0) 'ÄdºI "[" «eªº¦r¦ê
- AR = Replace(Mid(AR, 2, Len(AR) - 2), "null", " ") '´À´« "null" ¬° " "
- AR = Replace(AR, "T", " ") '´À´« "T" ¬° " "
- AR = Split(AR, "},{") '¥H "},{" ¤À³Î¬°°}¦C
- S = Array(4, 2, 0, 1, 3)
- Sh.Range("A13").CurrentRegion.Offset(1) = ""
- For i = 0 To UBound(AR)
- For II = 0 To UBound(S) - 1
- E = Split(AR(i), ",")(S(II + 1)) '¥H S(II + 1)ªºÈ ¨ú±o Split(AR(i), ",")°}¦Cªº¯Á¤ÞÈ
- Sh.Cells(i + 14, "A").Offset(, II) = Mid(E, InStr(E, ":") + 1)
- Next
- Next
- End Sub
- '¥X¤f³ø³æ³qÃö¬yµ{¬d¸ß(GB309) ºô¶ªºì©lÀÉ
- '<td class="resultHeader">®üªÅ¹B§O</td><td id="transTypeCd" class="result">
- '<td class="resultHeader" width="25%">®üÃö³qÃö¸¹½X</td><td width="25%" id="vslRegNo" class="result">
- '<td class="resultHeader" width="25%">¸Ë³f³æ½s¸¹</td><td width="25%" id="soNo" class="result">
- '<td class="resultHeader">³ø³æ¸¹½X</td><td id="declNo" class="result">
- '<td class="resultHeader">Ãö°Ï¥N½X</td><td id="custCd" class="result">
- '<td class="resultHeader">³øÃö·~ªÌ½c¸¹</td><td id="brokerBoxNoName" class="result">
- '<td class="resultHeader">¹B¿é·~ªÌ/¥N²z¦æ¥N½X</td><td id="carrierAgencyCd" class="result">
- '<td class="resultHeader">°U¹B³æ¥D¸¹</td><td id="mawb" class="result">
- '<td class="resultHeader">²z³æ¸¹½X</td><td id="arrangeNo" class="result">
- '<td class="resultHeader">°U¹B³æ¤À¸¹</td><td id="hawb" class="result">
- '<td class="resultHeader">¥Ó½Ð¼fÅç¤è¦¡</td><td id="examMethod" class="result">
- '<td class="resultHeader">³ø³æÃþ§O</td><td id="declType" class="result">
- '<td class="resultHeader">©ñ¦æªþ±a±ø¥ó</td><td id="relCondSubCd" class="result">
- '<td class="resultHeader">¬O§_¬°¨R°hµ|e¤Æ³ø³æ</td><td id="debitMark" class="result">
- '<tr><td colspan="4" class="resultHeader">¶Ç°eÁ`ÃB¥æ¬d¦Ü°]µ|¤¤¤ßªº¤é´Á</td>
- '<td class="resultHeader">²Ä¤@¦¸¶Ç°e¤é´Á</td><td id="firstSendDate" class="result">
- '<td class="resultHeader">³Ì«á¤@¦¸¶Ç°e¤é´Á</td><td id="lastSendDate" class="result">
½Æ»s¥N½X |
|