1. Delete the original Excel reference from web. config.
2. in Visual Studio
2005 in the command prompt tool, go to the Excel installation directory and run "tlbimp
Excel.exe command, compile excel.exe as Excel. dll. In this step,
The excell. dll is generated under the office11 (office2003) directory, so you need to find excel. dll under this directory when referencing it.
3. reference the compiled excel. dll. If you have a reference to Microsoft. Office. InterOP. Excel, delete it. As long
The folder contains Excel. dll.
Method 2:
Go to solution view. If it is web, right-click the virtual path, add web reference, select Browse, find the DLL file address, and click OK! That's it!
For the console:
The reference method is as follows:
Open solution view, right-click references, select Add reference, browse, find the DLL file address, and then OK!
If you have any questions! Send a message!