title: Power BI - load *.htm file saved as .xls
body: <p>I have a requirement where I have to import an <em>.xls</em> file which is saved as <strong>.*htm, .*html</strong></p>
  
  <p>Opening the file and clicking on saving as, will usually show the format that the file is in and this is how it looks -</p>
  
  <p><a href="https://i.stack.imgur.com/iWcbN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iWcbN.png" alt="File Format"></a></p>
  
  <p><a href="https://i.stack.imgur.com/LuI2w.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LuI2w.png" alt="File"></a></p>
  
  <p>I clicked on Binary and it showed me the .xls file and I opened it as <em>Excel workbook, csv, text, html, xml</em> but it didn't work :-</p>
  
  <p>Opening it as Excel Workbook gives me this error - <strong>Eternal Table is not in the Expected Format.</strong></p>
  
  <p>How do we load this inside Power BI. The data is present in Sheet1 starting from Row Number 5. I have been struggling with this by trying to load it.</p>
  
  <p>I can't edit and re-save the file manually as .xlsx, as it cannot be automated. 
  Also to note, saved it as a .xlsx file and it works fine. But that's not what I need.</p>
  
  <p>Kindly help me with this.</p>
  
  <p>I did refer to this article - but I am not familiar with M query </p>
  
  <p><a href="https://social.technet.microsoft.com/Forums/en-US/c58f8b19-b2d6-4ef6-890b-f10c62c0096f/external-table-is-not-in-the-expected-format?forum=powerquery" rel="nofollow noreferrer">https://social.technet.microsoft.com/Forums/en-US/c58f8b19-b2d6-4ef6-890b-f10c62c0096f/external-table-is-not-in-the-expected-format?forum=powerquery</a></p>
  
  <p>Other Similar Question - <a href="https://www.experts-exchange.com/questions/29064908/HTML-Excel-file-Power-Query-BI-Connection-can-this-be-done.html" rel="nofollow noreferrer">https://www.experts-exchange.com/questions/29064908/HTML-Excel-file-Power-Query-BI-Connection-can-this-be-done.html</a></p>
  
  <p>This is how My M-Code looks like,</p>
  
  <pre><code>let
      Source = Folder.Files("\\serverA\ShareB$\Desktop"),
      #"Filtered Rows" = Table.SelectRows(Source, each ([Extension] = ".xls")),
      #"Filtered Rows1" = Table.SelectRows(#"Filtered Rows", let latest = List.Max(#"Filtered Rows"[Date created]) in each [Date created] = latest),
      #"\\serverA\ShareB$\Desktop\_Raw Data Dump 2018-Oct-4 6-00-53 AM xls" = #"Filtered Rows1"{[#"Folder Path"="\\serverA\ShareB$\Desktop\",Name="Raw Data Dump 2018-Oct-4 6-00-53 AM.xls"]}[Content]
  in
      #"\\ServerA\ShareB$\Desktop\_Raw Data Dump 2018-Oct-4 6-00-53 AM xls"
  </code></pre>
  
  <p>Adding a sample file here for reference on the file type - </p>
  
  <blockquote>
    <p><a href="https://www.glump.net/_media/howto/web/serve-html-as-an-excel-file-from-a-web-application/example-html.xls.zip" rel="nofollow noreferrer">https://www.glump.net/_media/howto/web/serve-html-as-an-excel-file-from-a-web-application/example-html.xls.zip</a></p>
    
    <p>I tried with the above file on the link and it produces the same
    error. So, the question here is how to load the file in the above link
    inside Power BI, without changing the file manually.</p>
  </blockquote>