That does not seem to be the issue.
Because it works fine when i add D:\test.xlsx to 'Document path:' field.
I have done some further tests:
When i use the variable, that Power Automate created by using "Get files in folder", it does not work. Even though the correct filepath is shown.
My solution to this, is using a 'For Each' step to loop through the 'Files' variable that 'Get files in folder' step created.
Then adding a 'If' step to find the specific file I want (using contains test.xlsx)
Then using 'Set variable' to set 'CurrentItem' variable (that was created by the 'If' action) to my own variable called 'filepath'.
Next using the launch excel step, to open the excel file with 'filepath' variable.
This is too much work. The 'Get files in folder' step, should be able to produce the a working variable that can be used directly in Launch excel or Run Application.