我正在尝试将一个Web表(带有一些CSS格式)导入excel;但是,Excel拒绝正确呈现它。这是我的HTML
conStr = "URL;file:///" & curResDir & "\Results.html"
With ActiveWorkbook.ActiveSheet.QueryTables.Add(Connection:=conStr, Destination:=Range("A1"))
.Name = "QTPResult"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingAll
.WebTables = "1"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = True
.WebDisableDateRecognition = True
.WebDisableRedirections = True
.Refresh BackgroundQuery:=False
End With
浏览器将其显示为
Excel VBA
{{1}}