Excel online PowerQuery error trying to connect to SQL Server on-prem

I have a PowerQuery statement, that tries to connect to an on-prem SQL Server database. The query works fine when I run the Excel workbook on my desktop. However, when I try and connect to my data running Excel on the web, I get this error:

enter image description here

But I don’t have different data sources. Or do I ?

let
    Source = Sql.Database("myServer", "myDatabase"),
    prmStart = Excel.CurrentWorkbook(){[Name="startDate"]}[Content]{0}[Column1],
    prmEnd = Excel.CurrentWorkbook(){[Name="endDate"]}[Content]{0}[Column1],
    Query="
    SELECT tbl1.Col1, tbl1.Col2
    FROM dbo.tbl1 AS tbl1
    ",
    Result =Value.NativeQuery(Source, Query),
    CommandTimeout=#duration(0, 0, 5, 0)
in
    Result

  • Well, your query does read from both excel workbook and sql server?

    – 

Leave a Comment