摘要:
本次阐述的导入和导出都围绕此Demo进行1.导入Excel文件到Gridview首先列出导入Excel文件需要添加的Using: 1>Using System.IO; 2>Using System.Data.OleDb;主要用到的对象(类): 1>OpenFileDialog 2>FileInfo 3>DataTabel 4>OleDb具体代码如下: public DataTable Import() { OpenFileDialog oFD = new OpenFileDialog(); oFD.Filter = "Exe... 阅读全文