把Excel嵌入winform中,其实在思路的博客与MSDN都有相关的介绍,但所有的文章对于怎么获得载入的excel对象都没有说得太清楚,下面是我写的一个简单控件,用.net framework 1.1+office 2003测试通过。
Embed excel into winformusing System;
Embed excel into winform
using System.Collections;
Embed excel into winform
using System.ComponentModel;
Embed excel into winform
using System.Drawing;
Embed excel into winform
using System.Data;
Embed excel into winform
using System.Reflection;
Embed excel into winform
using System.Windows.Forms;
Embed excel into winform
using Microsoft.Win32;
Embed excel into winform
using Microsoft.Office.Interop.Excel;
Embed excel into winform
using ExcelApplication=Microsoft.Office.Interop.Excel.ApplicationClass;
Embed excel into winform
Embed excel into winform
Embed excel into winform
namespace ExcelTest

相关文章: