Web Query Not Working

Anonymous
2023-01-17T11:01:33+00:00

I've been trying to help out a user who is having issues running a web query from within an Excel spreadsheet. Whenever the query is attempted to run, it gives the error "[Expression.Error] The column 'Row Type' of the table wasn't found."

If you go into the code and try to delete {"Row Type", type text} out of the editor, it will move to the next column and declare whatever is next wasn't found as well.

I tried deleting the applied steps, but it deletes that data within the spreadsheet. The person who uses this spreadsheet only knows what it does so I'm not able to pick his brain to figure out how it works or ask about the code that has been put into it. I tried working with Microsoft but they can't work on it because of the custom code that was put into it. Also, The "Row Type" isn't even used in the spreadsheet. The entire column is blank. Any ideas on how to resolve it?

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

7 answers

Sort by: Most helpful
  1. Anonymous
    2023-01-17T11:19:20+00:00

    Hi Kris,

    Greetings! Thank you for posting to Microsoft Community.

    Try remove the steps of "change type" and reload your query.

    Then you can delete the column "Row Type".

    Best Regards,

    Snow Lu

    0 comments No comments
  2. Anonymous
    2023-01-17T12:14:11+00:00

    I tried that but it deletes all of the data that they put into the 2 spreadsheet pages in the book. I guess I should've said that I already tried this.

    0 comments No comments
  3. Anonymous
    2023-01-17T12:29:54+00:00

    Could you share your query code from advanced editor?

    let

    Source = Excel.Workbook(File.Contents("C:\Users\Name\Desktop\power query.xlsx"), null, true), 
    
    Sheet1\_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data] 
    

    in

    Sheet1\_Sheet
    

    0 comments No comments
  4. Anonymous
    2023-01-17T12:42:20+00:00

    let Source = Web.Page(Web.Contents("https://searchads.google.com/ds/reports/download?ay=20700000001268961&av=21700000001631218&rid=325879&of=webqueryphtml&authuser=0")), Data0 = Source{0}[Data], #"Changed Type" = Table.TransformColumnTypes(Data0,{{"Row Type", type text}, {"From", type date}, {"Effective c:Site.ID", type text}, {"Effective c:Type.ID", type text}, {"Cost", type number}, {"Revenue", type number}}) in #"Changed Type"

    0 comments No comments
  5. Anonymous
    2023-01-17T12:55:58+00:00

    It looks the data source is not match your data which is on your screenshot?

    let Source = Web.Page(Web.Contents("https://searchads.google.com/ds/reports/download?ay=20700000001268961&av=21700000001631218&rid=325879&of=webqueryphtml&authuser=0")), Data0 = Source{0}[Data], #"Expanded Children" = Table.ExpandTableColumn(Data0, "Children", {"Kind", "Name", "Children", "Text"}, {"Children.Kind", "Children.Name", "Children.Children", "Children.Text"}) in #"Expanded Children"

    0 comments No comments