[問題] 匯入外部web資料 格式問題

看板Office作者 (Jtin 介)時間10年前 (2015/08/09 17:06), 10年前編輯推噓0(002)
留言2則, 2人參與, 最新討論串1/1
(若是和其他不同軟體互動之問題 請記得一併填寫) 軟體:EXCEL 版本:2007 匯入外部資料日期格式為 08/01/15 月/日/年 但匯入之後 資料會自動跳掉變成 2008/01/15 有什麼方法可以限制匯入資料為文字格式呢? 謝謝 Sub 拉取網頁_原始版() With ActiveSheet.QueryTables.Add(Connection:= _ "URL;http://www.covers.com/pageLoader/pageLoader.aspx?page=/data/mlb/teams/pastresults/2015/team2959.html" _ , Destination:=Range("$A$9")) .Name = "team2959" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = True .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .WebSelectionType = xlEntirePage .WebFormatting = xlWebFormattingNone .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .WebSingleBlockTextImport = False .WebDisableDateRecognition = False .WebDisableRedirections = False .Refresh BackgroundQuery:=False End With End Sub -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 59.115.200.148 ※ 文章網址: https://www.ptt.cc/bbs/Office/M.1439111166.A.2AE.html ※ 編輯: winnina1 (59.115.200.148), 08/09/2015 17:06:26

08/09 17:41, , 1F
webdisabledaterecognition = false改為true試試
08/09 17:41, 1F

08/09 21:37, , 2F
這個方法OK 感謝大大
08/09 21:37, 2F
文章代碼(AID): #1LnnV-Ak (Office)
文章代碼(AID): #1LnnV-Ak (Office)