Using data from my excel sheet in my SQL Power Query RRS feed

  • Question

  • Hey all,

    I'm trying to create a report and it would be beneficial to be able to use two dates from my excel sheets in my SQL I have in the Power Query.  As of right now I'm changing it manually every time I want to see the data.

    SQL I'm using right now for my date range is:

    declare @startDate datetime = '4/1/2019 00:00'
    declare @endDate datetime = '04/30/2019 23:59:59.999'

    My excel name is: Bug Analysis.xlsx

    Sheet Name is: Bug Report

    Cells: B2 and B3

    Been researching a way I can replace those hard coded dates with values from a cell on my Excel's sheets without any luck.  Would save time and make this report a bit more dynamic when running.

    Thanks everyone!

    Monday, May 13, 2019 6:18 PM