Excel as DB, getting exception for run query - object reference not set to an instance

I have now directly used the expression in query which I was assigning to parameters and it worked. But I could not figure out what is the issue with passing parameters.