Over the last few months, I’ve been doing work with clients on creating some refreshable Excel reports. Working on one of them, we had parameters for dates and added one for Vendor ID, which is when I encountered an error:
Bad parameter type. Microsoft Excel is expecting a different ind of value than what was provided.
The Excel sheet looked fine with the three parameters all containing valid data:
Looking at the query in Connection Properties had the question marks denoting the parameters in the correct place in the queries:
It took me a while before I twigged that the problem was the order of the parameters. From the Connection Properties window, click the Parameters… button to view the parameter configuration. The parameters were set to read from specific cells and I had, without thinking it through, create the date parameters, tested the report and then added the Vendor ID to the third row and then moved it to the first row.
The order in which I’d taken these actions, left Excel set with the Vendor ID in cell B£ when it was now in cell B1:
Once I corrected the parameters, the error was resolved and the report successfully ran.