- ©«¤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
|
¦^´_ 15# HSIEN6001
Y¤£¥Î¼g¤JExcel,¦Óª½±µ .Click ¤U¸üCSVÀÉ(BIG5) ÀÉ®×
¹ïIEªº¯AÂy©|²L§ä¤£¥X¤U¸üCSVÀɪº°Ñ¼Æ,¦³½Ð°ª¤â«üÂI
¸ü¤J¨ä¥L¶¦¸
Dim IEx As Object '¤u§@ªí¼Ò²Õ- Private Sub ¤é³øªí¸ü¤J()
- Dim e As Object, A As Object, k As Integer, i As Integer, S As String
- If IE Is Nothing Then
- ¹Ï§Î§ó·s
- MsgBox "ÅçÃҹϤw§ó·s"
- Exit Sub
- End If
- With IE
- .Document.all.tags("INPUT")("stk_code").Value = Range(ÃÒ¨é¥N¸¹)
- .Document.all.tags("INPUT")("auth_num").Value = Trim(Range(ÅçÃÒ½X))
- Set A = .Document.all.tags("BUTTON")
- For Each e In A
- If Trim(e.Innertext) = "¬d¸ß" And e.ID = "" Then
- e.Click
- Exit For
- End If
- Next
- Do While .Busy Or .readyState <> 4: DoEvents: Loop
- UsedRange.Offset(6).Clear
- Range("a" & k + 1) = S
- If .Document.body.Innertext Like "***¸ÓªÑ²¼¸Ó¤éµL¥æ©ö¸ê°T***" Then S = "***¸ÓªÑ²¼¸Ó¤éµL¥æ©ö¸ê°T***"
- If .Document.body.Innertext Like "***ÅçÃÒ½X¿ù»~¡A½Ð«·s¬d¸ß¡C***" Then S = "***ÅçÃÒ½X¿ù»~¡A½Ð«·s¬d¸ß¡C*** "
- If S <> "" Then
- Range("a" & k + 1) = S
- MsgBox S
- GoTo NN
- End If
- Set IEx = CreateObject("InternetExplorer.Application")
- IEx.Navigate "about:Tabs"
- Set A = .Document.all.tags("A")
- ³æ¶¸ü¤J .Document.all.tags("table")(0).outerHTML
- [A6].Select
- '********µ{¦¡½X¼g¦b¤u§@ªí¼Ò²Õ: Me «ü³o¤u§@ªí¼Ò²Õ
- Me.PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:=False, NoHTMLFormatting:=True
- '****************************************
- If A.Length = 459 Then
- For i = 2 To 3
- ³æ¶¸ü¤J .Document.all.tags("table")(i).outerHTML
- With Range("A" & Rows.Count).End(xlUp).Offset(1)
- .Select
- Me.PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:=False, NoHTMLFormatting:=True
- End With
- Next
- Else
- For k = 0 To A.Length - 1
- If Val(A(k).Innertext) >= 1 Then
- Debug.Print A(k).Innertext
- A(k).Click
- Do While .Busy Or .readyState <> 4: DoEvents: Loop
- Set A = .Document.all.tags("A")
- Do While .Busy Or .readyState <> 4: DoEvents: Loop
- For i = 2 To 3
- ³æ¶¸ü¤J .Document.all.tags("table")(i).outerHTML
- With Range("A" & Rows.Count).End(xlUp).Offset(1)
- .Select
- Me.PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:=False, NoHTMLFormatting:=True
- End With
- Next
- End If
- Next
- End If
- IEx.Quit
- Set IEx = Nothing
- ¾ã²z
- NN:
- .Quit
- End With
- Set IE = Nothing
- ¹Ï§Î§ó·s
- End Sub
- Private Sub ³æ¶¸ü¤J(S)
- With IEx
- .Document.body.innerHTML = S
- .ExecWB 17, 2 ' Select All
- .ExecWB 12, 2 ' Copy selection
- End With
- End Sub
- Private Sub ¾ã²z()
- On Error Resume Next
- Application.EnableEvents = False
- With UsedRange.Offset(10)
- .Replace "§Ç¸¹", "=ex", xlWhole
- .SpecialCells(xlCellTypeFormulas, xlErrors).EntireRow.Delete
- End With
- UsedRange(1).Select
- Application.EnableEvents = True
- End Sub
½Æ»s¥N½X |
|