§ìWEB¸ê®Æ¥X²{¡uÀ³¥Îµ{¦¡©Îª«¥ó©w¸q¤Wªº¿ù»~¡v
- ©«¤l
- 16
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 68
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2015-2-26
- ³Ì«áµn¿ý
- 2021-10-4
|
§ìWEB¸ê®Æ¥X²{¡uÀ³¥Îµ{¦¡©Îª«¥ó©w¸q¤Wªº¿ù»~¡v
Dim xlMonth As String, row As Integer
row = 2 '©ñ¸m¸ê®Æªº°_©l¦C ¶·§ó§ï
For yr = 92 To 92 '¨ú±oªº¦~¥÷¾ú¥v¸ê®Æ µø»Ýn§ó§ï
For m = 8 To 12 '¨ú±oªº¤ë¥÷¾ú¥v¸ê®Æ µø»Ýn§ó§ï
xlMonth = Format(m, "00")
Sheets(42).Activate
With ActiveSheet.QueryTables.Add(Connection:="URL;http://siis.twse.com.tw/publish/sii/" & yr & "IRB130_" & xlMonth & ".HTM", Destination:=Sheets(42).Range("o1"))
'.Name = stockID & "_1"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "2"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
'With ActiveSheet.QueryTables.Add(Connection:= _
' "URL;http://siis.twse.com.tw/publish/sii/" & yr & "IRB130_" & xlMonth & ".HTM", Destination:=Range _
' ("O1"))
' .Name = "92IRB130_08"
' .FieldNames = True
' .RowNumbers = False
' .FillAdjacentFormulas = False
' .PreserveFormatting = True
' .RefreshOnFileOpen = False
' .BackgroundQuery = True
' .RefreshStyle = xlInsertDeleteCells
' .SavePassword = False
' .SaveData = True
' .AdjustColumnWidth = True
' .RefreshPeriod = 0
' .WebSelectionType = xlSpecifiedTables
' .WebFormatting = xlWebFormattingNone
' .WebTables = "2"
' .WebPreFormattedTextToColumns = True
' .WebConsecutiveDelimitersAsOne = True
' .WebSingleBlockTextImport = False
' .WebDisableDateRecognition = False
' .WebDisableRedirections = False
' .Refresh BackgroundQuery:=False
'End With
Cells(row, "B") = Cells(1500, "P")
Cells(row, "C") = Cells(1500, "S")
Cells(row, "D") = Cells(1500, "U")
Cells(row, "E") = Cells(1500, "V")
Cells(row, "F") = Cells(1500, "W")
row = row + 1
Next
Next |
|
|
|
|
|
|