At the end of the holiday, I encountered a problem where I could not generate an Excel file for data export. I asked the original developer if they had not obtained valuable information, the solution provided by Microsoft does not solve the problem.
The client prompts "retrieving components whose CLSID is {00024500-0000-0000-0000-000000000046-} in the com class factory failed. The cause is the following error: 8000401a
The reason is that excel is exported using DCOM to call Excel, and remote users cannot run excel.
Currently, the solution is to maintain the Administrator's logon status on the server side. You can access the server normally without logging out of the client.
However, another problem with this calling method is that a large number of Excel processes are generated on the server, resulting in a decline in server performance, therefore, we recommend that you directly generate an Excel file to export data to an Excel file without special requirements. This can be used as a general process and can be called directly when necessary.