C # winform cannot find the reference component "Excel" SOLUTION
Method 1:
According to Microsoft Website:
One way to correct this problem is to create blank Excel and Word applications that install components before running the new application. Alternatively, select the "advanced" option during the Office installation process and specify. Net programmability support, Specified for Visual Studio Tools for officeForms 2.0. Net programmability supportAndMicrosoft Graph. Net programmability support.
Method 2:
Find excel.exe in the officeinstallation directory.
Use the vs command tool to run the CD command to C: \ Program Files \ Microsoft Office \ office11, and then enter tlbimp excel.exe to generate
Excel. dll
Then reference this DLL to solve the problem.
The second method is recommended, which is simple. I have passed the test.
Method 1:
According to Microsoft Website:
One way to correct this problem is to create blank Excel and Word applications that install components before running the new application. Alternatively, select the "advanced" option during the Office installation process and specify. Net programmability support, Specified for Visual Studio Tools for officeForms 2.0. Net programmability supportAndMicrosoft Graph. Net programmability support.
Method 2:
Find excel.exe in the officeinstallation directory.
Use the vs command tool to run the CD command to C: \ Program Files \ Microsoft Office \ office11, and then enter tlbimp excel.exe to generate
Excel. dll
Then reference this DLL to solve the problem.
The second method is recommended, which is simple. I have passed the test.
Method 1:
According to Microsoft Website:
One way to correct this problem is to create blank Excel and Word applications that install components before running the new application. Alternatively, select the "advanced" option during the Office installation process and specify. Net programmability support, Specified for Visual Studio Tools for officeForms 2.0. Net programmability supportAndMicrosoft Graph. Net programmability support.
Method 2:
Find excel.exe in the officeinstallation directory.
Use the vs command tool to run the CD command to C: \ Program Files \ Microsoft Office \ office11, and then enter tlbimp excel.exe to generate
Excel. dll
Then reference this DLL to solve the problem.
The second method is recommended, which is simple. I have passed the test.