If you search Answers for "failed to initialize excel", you'll find several questions and answers about this issue.
Search - About 5050 Results Found - FlexSim Community
The problem is an issue with how Excel is registered as a COM application with Windows. It is usually fixed by uninstalling and reinstalling Excel.
In the cases where uninstalling and reinstalling Excel doesn't fix the issue, it is usually caused by having multiple versions of different Office applications installed. For example, if you have OneNote 2016 installed and you are trying to communicate with Excel 2014. When FlexSim tries to launch an Excel instance, Windows looks for Excel 2016 because that's the latest Office path that has been registered, but then it can't find Excel 2016. The solution is usually to uninstall newer Office applications or install a newer Excel version that matches the latest Office applications that are installed.
The issue is happening within code that is not under direct FlexSim control. We create an "Excel.Application" instance, and the operating system determines what to do. The error message displayed is the error code that Windows is returning when trying to initialize an Excel instance. So the only answer I have right now is that you need to install/uninstall/repair Office applications until it works properly. There's nothing we can do about this error from the FlexSim side with the way the connection between FlexSim and Excel currently works.
It is on the development list to look into reading Excel workbook files directly without communicating with the Excel application via COM, but that functionality is a future possibility, not a current solution.
It looks like the involved registry keys for locating Excel might be:
HKEY_CLASSES_ROOT\Excel.Application\CLSID
Which references a key in HKEY_CLASSES_ROOT\WOW6432Node\CLSID\
On my machine, that key has an Excel path "C:\Program Files\Microsoft Office\Root\Office16\EXCEL.EXE" in the key value of HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{00024500-0000-0000-C000-000000000046}\LocalServer32
My guess is that Windows uses those registry keys to find Excel, and something in your registry isn't configured correctly to map the "Excel.Application" to the correct path to your installed Excel version.
The Microsoft Office installer should be generating and setting up all those registry key values. FlexSim simply asks for an instance of "Excel.Application".