excelpowerqueryexcel-web-queryexcelquery

Web Query missing css elements in the table


I using a web query on the NCSL Excuse Absentee Voting Table (https://www.ncsl.org/elections-and-campaigns/table-2-excuses-to-vote-absentee). The table uses this element to mark cells that I would like to show as true:

<td>
     <ul>
          <li>::before
          &nbsp;</li>
     </ul>
</td>

When I query this I cannot get it to read those cells as having anything in them. What am I missing?


Solution

  • This seems to work. Replaces the bullet with XXX before processing

    let Source = Web.Contents("https://www.ncsl.org/elections-and-campaigns/table-2-excuses-to-vote-absentee"),
    Source1= Text.Combine(Lines.FromBinary(Source, null, null, 65001)),
    Source2=Text.Replace(Source1,"<ul><li>&nbsp;</li></ul>","XXX"),
    Source3=Web.Page(Source2){0}[Data]
    in Source3
    

    enter image description here

    enter image description here