[问题] 汇入外部web资料 格式问题

楼主: winnina1 (Jtin 介)   2015-08-09 17:06:01
(若是和其他不同软件互动之问题 请记得一并填写)
软件: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
作者: soyoso (我是耀宗)   2015-08-09 17:41:00
webdisabledaterecognition = false改为true试试
楼主: winnina1 (Jtin 介)   2015-08-09 21:37:00
这个方法OK 感谢大大

Links booklink

Contact Us: admin [ a t ] ucptt.com