Excel 2016 - I have an Excel file that imports a table from SQL Server via a connection created with the Data->Get Data->From Database->From Sql Server Database. As part of the Advanced Options while creating that connection I included a SQL query that basically reads:
What I would like to do is be able to input those two dates into two cells inside the Excel workbook, and then when I hit refresh on the connection, the dates in that query populate with the dates in the cells.
Is this possible?
Code:
SELECT
[BillingCodeId]
,[ClientId]
,[Details]
,[DateTime]
FROM [dbo].[Billing]
WHERE DateTime between '2017-10-01' and '2017-11-01'
What I would like to do is be able to input those two dates into two cells inside the Excel workbook, and then when I hit refresh on the connection, the dates in that query populate with the dates in the cells.
Is this possible?
Last edited: