Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Need help to get a table from web

Hello Well, I'm having trouble retrieving all the data from the table on this website https://mm.exame.com/maiores-empresas/. I can only pull the first page with 10 rows, and the code becomes huge...
  • osama_ayoub's avatar
    3 years ago

    @Guilguis

    Hi,
    I used this code and I found it straightforward, you can try it
    Regards

     

    let
    Source = Web.Page(Web.Contents("https://mm.exame.com/maiores-empresas/")),
    Data0 = Source{0}[Data],
    #"Changed Type" = Table.TransformColumnTypes(Data0,{{"Ranking das maiores", Int64.Type}, {"EMPRESA", type text}, {"CIDADE", type text}, {"ESTADO", type text}, {"SETOR", type text}, {"Receita 2021", type text}, {"Receita 2020", type text}, {"Lucro Líquido 2021", type text}, {"Ativo Total 2021", type text}, {"Patrimonio Líquido 2021", type text}})
    in
    #"Changed Type"