Solved - The action is only valid for product that are currently installed

I could open files from Excel but when I tried to open an excel file from any folder, I got the error

The action is only valid for product that are currently installed

I tried to repair Office app from the control panel but that didnt help either, so I compared the registry of the problematic system with the working one and found the following:

HKEY_CLASSES_ROOT\Excel.Sheet.12\shell\Open\command

Apart from the default entry there was also a 'command' entry with garbled text.

I took the backup of the registry, deleted the 'command' entry and tested

I could now open Excel files without any issues.

Note: This can also apply to other office products