The recent use of. NET to do a small software encounter a problem is to implement the Excel table in the WinForm open, but also can operate, not only open, or extract data. On the internet to find a lot of information, found that the information is relatively small, even if there are old version of the use of the method. Share some of your experience with using vs C # embedded excel in WinForm.
first of all , I used the VS version is 2010, as far as I know, 2010 vs is not the control (just want the button control can pull in directly). So we need a third-party control to implement this function.
then , what is the third-party control we need to call? This control is Dsoframer.cox. This is a Cox file, just drag it into the toolbox and we can pull it straight in like any other control.
finally , in the end, is the work stage. To drag the control into the WinForm, in the Laod method, add the Excel table that we need to open:
Public Partial class Form1:form { public Form1 () { InitializeComponent (); " \\excel\\ Support Project schedule. xls " ); } }
The final effect:
Download Http://files.cnblogs.com/pingming/dsoframerocx.rar
How C # embeds excel in WinForm, embedded Excel,word