1
votes

I have a stored proc in my SQL DB which I would like to query for data via Power Query in excel. There are three parameters for this procedure for filtering data, and I would like to pass these via Power Query too. The specific parameters should come from some form controls present in my excel sheet - namely some dropdown comboboxes. I'd like to, within the Power Query M, extract the current value of the combobox and pass it as a parameter to the stored procedure.

I know it's possible to gather cell and row/column data within M, but I haven't been able to find out how to collect form data.

Is there an approach I can take for this?

Thanks!

1
Can't you either use Data validation dropdowns or link the controls to cells (with an additional INDEX formula) so that M can read the values? - Rory

1 Answers

0
votes

user3261018,

you can try following approach:

Assign the combobox value to a named cell, then address it with

 Excel.CurrentWorkbook(){[Name="NameOfCellWithComboboxValue"]}[Content]