|
一、将Excel数据只读到程序中显示:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using Microsoft.Office.Interop.Excel; using System.Reflection;
namespace ExcelDemo { public partial class Form1 : Form { public Form1() { InitializeComponent();
}
private void button1_Click(object sender, EventArgs e) { Microsoft.Office.Interop.Excel.ApplicationClass app = new ApplicationClass(); app.Visible = false; WorkbookClass w = (WorkbookClass)app.Workbooks.Open(@"C:\Documents and Settings\qqq\桌面\002.xls", //Environment.CurrentDirectory+ Missing.Value, &nb [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>
|