>Can you please provide a bit more of the context, what exactly you're trying to do?
OpenRowSet() can be used to select from various sources, among them, Excel files. We select into #Temp. One of the parameter is the full path of the file. This cannot be passed as a variable. The only way is to string everything, the entire command, and execute that.