ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] vba¶×¤JcsvÀÉÄæ¦ì°ÝÃD

[µo°Ý] vba¶×¤JcsvÀÉÄæ¦ì°ÝÃD

  1.             With ActiveSheet.QueryTables.Add(Connection:= _
  2.                 "URL;https://www.twse.com.tw/exchangeReport/MI_INDEX?response=csv&date=" & y & m & d & "&type=ALL", Destination:=Range("A1"))
  3.                 .Name = "09_1"
  4.                 .FieldNames = True
  5.                 .RowNumbers = False
  6.                 .FillAdjacentFormulas = False
  7.                 .PreserveFormatting = False
  8.                 .RefreshOnFileOpen = False
  9.                 .BackgroundQuery = True
  10.                 .RefreshStyle = xlInsertDeleteCells
  11.                 .SavePassword = False
  12.                 .SaveData = True
  13.                 .AdjustColumnWidth = True
  14.                 .RefreshPeriod = 0
  15.                 .WebSelectionType = xlSpecifiedTables
  16.                 .WebFormatting = xlWebFormattingAll
  17.                 .WebTables = "10"
  18.                 .WebPreFormattedTextToColumns = True
  19.                 .WebConsecutiveDelimitersAsOne = True
  20.                 .WebSingleBlockTextImport = False
  21.                 .WebDisableDateRecognition = False
  22.                 .WebDisableRedirections = False
  23.                 .Refresh BackgroundQuery:=False
  24.             End With
½Æ»s¥N½X
¤W­±µ{¦¡½X°õ¦æ«á¡A±o¨ìªº¬O¥H  ,  ¬°°Ï¹jªº¤@¦C¸ê®Æ¡A
½Ð°Ý¸Ó¦p¦ó¦Û°Ê¶×¤J¨Ã¥H  ,  °Ï¤ÀÄæ¦ì©O?
§Ú¬O´µ¦h

¤W­±µ{¦¡½X°õ¦æ«á¡A±o¨ìªº¬O¥H  ,  ¬°°Ï¹jªº¤@¦C¸ê®Æ¡A
½Ð°Ý¸Ó¦p¦ó¦Û°Ê¶×¤J¨Ã¥H  ,  °Ï¤ÀÄæ¦ì©O?
reangame µoªí©ó 2021-3-17 18:18

§Ú¥u·Q¨ì¤@­Ó¤èªk,
§A¥i°Ñ¦Ò¥H¤Uºô§}¤¤·L³nªº¨ç¦¡¥\¯à»¡©ú¦Û¤v¸Õ¸Õ¬Ý :
Range.TextToColumns ¤èªk (Excel)

TOP

¦^´_ 2# luhpro


    ÁÂÁ±z¡A§Ú¦A¸Õ¸Õ¬Ý
§Ú¬O´µ¦h

TOP

¥»©«³Ì«á¥Ñ reangame ©ó 2021-3-28 17:02 ½s¿è
  1.             Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
  2.                 TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
  3.                 Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
  4.                 :=",", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, _
  5.                 1), Array(6, 1), Array(7, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12 _
  6.                 , 1), Array(13, 1), Array(14, 1), Array(15, 1), Array(16, 1), Array(17, 1)), _
  7.                 TrailingMinusNumbers:=True
½Æ»s¥N½X
¥Î¸ê®Æ­åªRªº¤èªk¥i¥H¸Ñ¨M¡AÁÂÁ¡I
§Ú¬O´µ¦h

TOP

        ÀR«ä¦Û¦b : ¥Ç¿ù¥XÄb®¬¤ß¡A¤~¯à²M²bµL·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD