Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Issue with importing data from web

Hello,

 

I tried to import tables from a web site and it doesn't work. 

So i tried with another website but now i'm just able to see the tables from the first website (which doesn't work). 

The tables never up date, i don't know why. 

 

Can you help me please ? 

6 REPLIES 6
Anonymous
Not applicable

I do the same things as the guide but it doesn't work. 

I click on import data from web, copy/past the url. 

I tried with a lot of web site but i always have the following tables :

 

nhe_0-1666965535429.png

 

I never have other table, so i can take new data. 

 

Anonymous
Not applicable

I use the most recent version of power bi desktop. 

 

I just install it, so i don't know where i can the the code as you send it. 

 

The problem is not only for the web site. 

No matter the web site that i try to import, i always have the same table in the navigator. There is no update. 

May be there is a problem with my settings ? 

Anonymous
Not applicable

The source URL is the following : Démographie de la France — Wikipédia (wikipedia.org)

 

But i tried with many sources and it don't work too... 

With this code it worked for me without any issues.

 

 

let
    Source = Web.BrowserContents("https://fr.wikipedia.org/wiki/D%C3%A9mographie_de_la_France"),
    #"Extracted Table From Html" = Html.Table(Source, {{"Column1", "TABLE.wikitable:nth-child(31) > * > TR > :nth-child(1)"}, {"Column2", "TABLE.wikitable:nth-child(31) > * > TR > :nth-child(2)"}, {"Column3", "TABLE.wikitable:nth-child(31) > * > TR > :nth-child(3)"}, {"Column4", "TABLE.wikitable:nth-child(31) > * > TR > :nth-child(4)"}, {"Column5", "TABLE.wikitable:nth-child(31) > * > TR > :nth-child(5)"}, {"Column6", "TABLE.wikitable:nth-child(31) > * > TR > :nth-child(6)"}, {"Column7", "TABLE.wikitable:nth-child(31) > * > TR > :nth-child(7)"}, {"Column8", "TABLE.wikitable:nth-child(31) > * > TR > :nth-child(8)"}, {"Column9", "TABLE.wikitable:nth-child(31) > * > TR > :nth-child(9)"}, {"Column10", "TABLE.wikitable:nth-child(31) > * > TR > :nth-child(10)"}, {"Column11", "TABLE.wikitable:nth-child(31) > * > TR > :nth-child(11)"}, {"Column12", "TABLE.wikitable:nth-child(31) > * > TR > :nth-child(12)"}}, [RowSelector="TABLE.wikitable:nth-child(31) > * > TR"]),
    #"Promoted Headers" = Table.PromoteHeaders(#"Extracted Table From Html", [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"", Int64.Type}, {"Population (1er janvier)", type text}, {"Naissances", type text}, {"Décès", type text}, {"Accroissement naturel", type text}, {"Taux de natalité (pour 1000)", type text}, {"Taux de mortalité (pour 1000)", type text}, {"Accroissement naturel (pour 1000)", type text}, {"Taux de fécondité[Note 1]", type text}, {"Taux de mortalité infantile (pour 1000 naissances)", type text}, {"Espérance de vie (hommes)", type text}, {"Espérance de vie (femmes)", type text}}),
    #"Removed Bottom Rows" = Table.RemoveLastN(#"Changed Type",1)
in
    #"Removed Bottom Rows"

 

 

are you using the most recent version of PBI desktop?

please keep in mind that the page content and structuture may change.

here is the history of the page

hokeson
Employee
Employee

Hello, what is the source url? Is the table in the source well formated?

 

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.