Excel无法为导入的Web表正确呈现CSS

时间:2015-07-24 19:27:55

标签: html css excel excel-vba vba

我正在尝试将一个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

浏览器将其显示为

enter image description here 但是,当我在Excel中导入它时,它显示如下

enter image description here

Excel VBA

{{1}}

0 个答案:

没有答案