title: Excel not rendering CSS correctly for imported web table
body: <p>I'm trying to import a web table (with some CSS formatting) into excel; however, Excel refuses to render it properly. Here is my HTML</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;META http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
          &lt;style type="text/css"&gt;
              table { table-layout:auto; border-collapse:collapse; border:thin solid black; font-family:Arial; }
              th { } 
              .Headline { padding:0pt; font-size:9pt; background-color:#FFFF00; color:#FF0000; border:thin solid black; vertical-align:top; }
              tbody { border:1px solid Black; }
              tbody:nth-child(odd) { background: RGB(255, 255, 220); }
              tbody:nth-child(even) { background: RGB(238, 255, 255); }           
              td { vertical-align:top; border:thin dotted Silver; padding:0pt; font-size:8pt; padding-right:3px; padding-left:3px; mso-number-format:"\@"; }
              pre { margin:0; padding:0; white-space:pre-wrap; font-size:8pt; font-family:Arial; }
          &lt;/style&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;table&gt;
              &lt;th class="Headline"&gt;TC #&lt;/th&gt;
              &lt;th class="Headline"&gt;Steps&lt;/th&gt;
              &lt;th class="Headline"&gt;Details&lt;/th&gt;
              &lt;th class="Headline"&gt;Timestamp&lt;/th&gt;
              &lt;tbody&gt;
                  &lt;tr&gt;
                      &lt;td class="UCNumber"&gt;1&lt;/td&gt;
                      &lt;td class="Level1"&gt;▬▬ UC_010 ▬▬&lt;/td&gt;
                      &lt;td&gt;&lt;pre&gt;Product Multiple; Event = NEW&lt;/pre&gt;&lt;/td&gt;
                      &lt;td&gt;01/04/2015 - 10:43:54&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td class="Level1"&gt;●●● TD_SETUP&lt;/td&gt;
                      &lt;td&gt;&lt;pre&gt;Executing script steps of TD_SETUP&lt;/pre&gt;&lt;/td&gt;
                      &lt;td&gt;01/04/2015 - 10:43:54&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td class="Level1"&gt;Statement Skipped: #NEWAMEND&lt;/td&gt;
                      &lt;td&gt;&lt;pre&gt;0&lt;/pre&gt;
                      &lt;/td&gt;
                      &lt;td&gt;01/04/2015 - 10:43:55&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td class="Level1"&gt;Statement Skipped: #OUTBOUND&lt;/td&gt;
                      &lt;td&gt;&lt;pre&gt;2&lt;/pre&gt;
                      &lt;/td&gt;
                      &lt;td&gt;01/04/2015 - 10:43:55&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td class="Level1"&gt;●●● TD_VERIFYNEWAMEND&lt;/td&gt;
                      &lt;td&gt;&lt;pre&gt;Executing script steps of TD_VERIFYNEWAMEND&lt;/pre&gt;&lt;/td&gt;
                      &lt;td&gt;01/04/2015 - 10:44:01&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/tbody&gt;
              &lt;tbody&gt;
                  &lt;tr&gt;
                      &lt;td class="UCNumber"&gt;2&lt;/td&gt;
                      &lt;td class="Level1"&gt;▬▬ UC_011 ▬▬&lt;/td&gt;
                      &lt;td&gt;&lt;pre&gt;Product Multiple; Event = AMEND&lt;/pre&gt;&lt;/td&gt;
                      &lt;td&gt;01/04/2015 - 10:45:14&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td class="Level1"&gt;●●● TD_SETUP&lt;/td&gt;
                      &lt;td&gt;&lt;pre&gt;Executing script steps of TD_SETUP&lt;/pre&gt;&lt;/td&gt;
                      &lt;td&gt;01/04/2015 - 10:45:14&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td class="Level1"&gt;Statement Skipped: #NEWAMEND&lt;/td&gt;
                      &lt;td&gt;&lt;pre&gt;0&lt;/pre&gt;&lt;/td&gt;
                      &lt;td&gt;01/04/2015 - 10:45:14&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td class="Level1"&gt;Statement Skipped: #OUTBOUND&lt;/td&gt;
                      &lt;td&gt;&lt;pre&gt;2&lt;/pre&gt;&lt;/td&gt;
                      &lt;td&gt;01/04/2015 - 10:45:14&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td class="Level1"&gt;●●● TD_VERIFYNEWAMEND&lt;/td&gt;
                      &lt;td&gt;&lt;pre&gt;Executing script steps of TD_VERIFYNEWAMEND&lt;/pre&gt;&lt;/td&gt;
                      &lt;td&gt;01/04/2015 - 10:45:20&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/tbody&gt;
              &lt;tbody&gt;
                  &lt;tr&gt;
                      &lt;td class="UCNumber"&gt;3&lt;/td&gt;
                      &lt;td class="Level1"&gt;▬▬ UC012 ▬▬&lt;/td&gt;
                      &lt;td&gt;&lt;pre&gt;Product Multiple; Event = CANCEL&lt;/pre&gt;&lt;/td&gt;
                      &lt;td&gt;01/04/2015 - 10:46:34&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td class="Level1"&gt;●●● TD_SETUP&lt;/td&gt;
                      &lt;td&gt;&lt;pre&gt;Executing script steps of TD_SETUP&lt;/pre&gt;&lt;/td&gt;
                      &lt;td&gt;01/04/2015 - 10:46:34&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td class="Level1"&gt;Statement Skipped: #CANCEL&lt;/td&gt;
                      &lt;td&gt;&lt;pre&gt;3&lt;/pre&gt;&lt;/td&gt;
                      &lt;td&gt;01/04/2015 - 10:46:34&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td class="Level1"&gt;●●● TD_VERIFYCANCEL&lt;/td&gt;
                      &lt;td&gt;&lt;pre&gt;Executing script steps of TD_VERIFYCANCEL&lt;/pre&gt;&lt;/td&gt;
                      &lt;td&gt;01/04/2015 - 10:46:40&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/tbody&gt;
          &lt;/table&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Browser displays it as</p>
  
  <p><a href="https://i.stack.imgur.com/wv9C1.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wv9C1.jpg" alt="enter image description here"></a>
  However, when I import it in Excel it is showing up as follows</p>
  
  <p><a href="https://i.stack.imgur.com/mhRpn.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mhRpn.jpg" alt="enter image description here"></a></p>
  
  <p>Excel VBA</p>
  
  <pre><code>conStr = "URL;file:///" &amp; curResDir &amp; "\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
  </code></pre>