How C # embeds excel in WinForm, embedded Excel,word

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.