using System;using System.Collections.Generic;using System.Linq;using System.Text;using NPOI.HSSF.UserModel;using NPOI.HPSF;using NPOI.POIFS.FileSystem;using System.IO;using NPOI.SS.Util; namespace ExcelPlay{ public class Excel { public
添加引用 using NPOI.HSSF.UserModel; using NPOI.SS.UserModel; using System; using System.Collections.Generic; using System.Data; using System.IO; using System.Text; 导入 public DataSet ExcelToDataTable(string path) { DataSet dataSet1 = new DataSet(); HSSFWo
实例功能概述: 1.支持Excel2003以及2007 2.支持Excel读取到DataTable(TableToExcel) 3.支持DataTable导出到Excel(TableToExcel) 4.支持WPF DataGrid导出到Excel(SelectedRowToExcel,AllRowToExcel) using System; using System.Collections.Generic; using System.IO; using System.Linq; using S