¼ÐÃD:
§ì4Óºô¶¦X¨Ö¤@¥÷¸ê®Æ,2Ó¿é¤JÄæ¦ì¼gªk½Ð±Ð(¦~,¤ë)
[¥´¦L¥»¶]
§@ªÌ:
bioleon69
®É¶¡:
2017-5-2 15:55
¼ÐÃD:
§ì4Óºô¶¦X¨Ö¤@¥÷¸ê®Æ,2Ó¿é¤JÄæ¦ì¼gªk½Ð±Ð(¦~,¤ë)
¥»©«³Ì«á¥Ñ bioleon69 ©ó 2017-5-2 15:58 ½s¿è
±qÆ[´ú¯¸¶i¥h¦³8ӿﶵ
http://mops.twse.com.tw/mops/web/t21sc04_ifrs
¦p¹Ï
[attach]27136[/attach]
°ê¤º¤W¥«http://mops.twse.com.tw/nas/t21/sii/t21sc03_106_3_0.html
°ê¥~¤W¥«http://mops.twse.com.tw/nas/t21/sii/t21sc03_106_3_1.html
°ê¤º¤WÂdhttp://mops.twse.com.tw/nas/t21/otc/t21sc03_106_3_0.html
°ê¥~¤WÂdhttp://mops.twse.com.tw/nas/t21/otc/t21sc03_106_3_1.html
§Ú·Q±N«e¥|ӿﶵ
¸Ì±ªººô¶ªí®æ¤º®e,¥þ³¡¼g¤J¦P¤@¥÷excel
excel¸Ì±´N©ñ¨âÓ¿é¤JªºÄæ¦ì
¦~¸ò¤ë
½Ð°Ý¦³¤°»ò¤èªk¥i¥H³o¼Ë¼g?
¥Ø«e¬O¥u·|¼g¤@Óºô§}¶i¥h,¥Îqt
¤]ÁÙ¨S³]©w¦~¤ë¤À§O¦ba1,b1¿é¤J
Sub ¤ëÀ禬()
Call ²M°£¥~³¡¸ê®Æ
UsedRange.Clear
Set keyin = ActiveSheet
Set Show = keyin.QueryTables _
.Add(Connection:="URL;http://mops.twse.com.tw/nas/t21/sii/t21sc03_106_3_0.html", _
Destination:=keyin.Cells(1, 1))
With Show
.Name = "¼È¦s¸ê®Æ"
.RefreshStyle = xlInsertEntireRows
.AdjustColumnWidth = False
.RefreshPeriod = 0 'Ãö³¬©w®É§ó·s
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone ' µL®æ¦¡
.Refresh BackgroundQuery:=False
End With
End Sub
Sub ²M°£¥~³¡¸ê®Æ()
Dim sh As Worksheet, qyt As QueryTable
For Each sh In ActiveWorkbook.Worksheets
For Each qyt In sh.QueryTables
qyt.Delete
Next
Next
End Sub
½Æ»s¥N½X
qt
msxml2
InternetExplorer.Application
¥u¯àµy·L¬Ý±oÀ´¤@ÂIÂI¤@ÂIÂI³o¤TºØªº¤èªk= =
¬ß¤j¤j̱оǫü±Ð
§@ªÌ:
bioleon69
®É¶¡:
2017-5-8 06:08
¥ý¤£¥Î³Ò·Ð¤j¤j,¤£¦n·N«ä
¥Ø«eµ{¦¡½X¥H§ó°Ê
¨S¥´ºâ¥ÎQT¤F
¥Ø«e¤wXML¬°¥D
ÁÂÁÂ
§@ªÌ:
bioleon69
®É¶¡:
2017-5-12 07:49
¥»©«³Ì«á¥Ñ bioleon69 ©ó 2017-5-12 07:51 ½s¿è
¦^´_
2#
bioleon69
½Ð±Ð¤j¤j!
¥Ø«e¥ÎQT¶×¤Jºô¶¸ê®Æ
¦³4ÓURL
4ÓSUB¤£¦Pªº¦a¤è´N¬O,URL¸ò.NAMEªº³¡¤À
¤£ª¾¹D¦³¨S¦³¿ìªk¦X¨Ö¦¨¤@ÓSUB?(§Ú²{¦b¬O¶]4ÓSUB,¥u¦³URL¸òNAME¤£¤@¼Ë)
³o¼Ë°õ¦æ·Pı¬O¦P¼ËªºªF¦è¶]4¦¸,³t«×¸ò®Ä²v¤W³£¦ü¥G³£®t¤F,©Ò¥H¨Ó½Ð±Ð«e½úÌ
¦³¨S¦³¥i¥HÅܦ¨¤@Óªº¤èªk
¥Ø«e¬O¥Î¤@ÓsubµM«á
call test
call test1
call test2
call test3
µM«átest,test1,test2,test3 ´Nurl¸ò.name¤£¦P
Sub TEST()
With ActiveSheet.QueryTables.Add(Connection:="URL;http://mops.twse.com.tw/nas/t21/sii/t21sc03_" & ccyear & "_" & ccmonth & "_0.html", Destination:=Range("B" & maxr + 5))
.Name = "TEST"
.WebFormatting = xlWebFormattingNone
.WebTables = "2"
.RefreshStyle = xlOverwriteCells
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebDisableDateRecognition = False
.Refresh BackgroundQuery:=False
End With
End Sub
½Æ»s¥N½X
§@ªÌ:
GBKEE
®É¶¡:
2017-5-12 09:11
¦^´_
3#
bioleon69
Option Explicit '¦b¼Ò²Õ¼h¦¸¤¤±j¢¨CÓ¦b¼Ò²ÕùتºÅܼƳ£¥²¶·©ú½Tªº«Å§i¡C
Sub Ex()
Dim Ar1(), Ar2(), i As Integer
Ar1 = Array("http://mops.twse.com.tw/nas/t21/sii/t21sc03_", "XXX1", "XXX2", "XXX3")
Ar2 = Array("TEST1", "TEST2", "TEST3", "TEST4")
For i = 0 To UBound(Ar1)
TEST Ar1(i), Ar2(i)
Next
End Sub
Sub TEST(ByVal xUrl As String, ByVal xName As String)
With ActiveSheet.QueryTables.Add(Connection:="URL;" & xUrl & ccyear & "_" & ccmonth & "_0.html", Destination:=Range("B" & maxr + 5))
.Name = xName
.WebFormatting = xlWebFormattingNone
.WebTables = "2"
.RefreshStyle = xlOverwriteCells
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebDisableDateRecognition = False
.Refresh BackgroundQuery:=False
End With
End Sub
½Æ»s¥N½X
§@ªÌ:
bioleon69
®É¶¡:
2017-5-13 12:54
¦^´_
4#
GBKEE
¦¬¨ì!»°ºò¨Ó´ú¸Õ¤@¤U¬Ý¬Ý!
Åwªï¥úÁ{ ³Â»¶®a±Ú°Q½×ª©ª© (http://forum.twbts.com/)