Following great Mynda tutorial on web scraping, I've managed a good effort in PowerBI. But I want to use the PQ in Excel. Here is a simplified example on one of my own websites just scraping one line of text:
let
Source = Web.BrowserContents("https://gcloudmarketing.uk/"),
#"Extracted Table From Html" = Html.Table(Source, {{"Example_scrape_text", "[id*=""sp-rchwtv""]"}}),
#"Changed Type" = Table.TransformColumnTypes(#"Extracted Table From Html",{{"Example_scrape_text", type text}})
in
#"Changed Type"
This works in PowerBI, but not in Excel PQ. The error message is: Expression.Error: The import Html.Table matches no exports. Did you miss a module reference?
The real project I'm working on collects (at the larger site) 40+ columns x 40,000 rows, mixes with data from several other sources to provide interesting analytics.
What do you suggest is the problem and is there a solution in Excel?
I know there's a python/scrapy route - but my skills aren't up to maintaining those scripts and so I hope there's a way to get the data model from PowerBI into Excel.
As a newbie, I'm really enjoying the course and I'm so grateful for the precise no-waffle delivery. Most refreshing!
Many thanks
Simon (UK)
Hi Simon,
Power Query in Excel doesn't support the Web.BrowserContents function yet. You can only scrape by example in Power BI at the moment.
You can use a new feature called Power BI Organisational Data Types to bring the data into Excel.
Mynda