資源簡介
這是專門實現了excel與數據控件的操作的簡單功能,可是實現數據導入excel,也可是實現數據從excel導入數據空間,只需調用此類即可。
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Text;
using?Excel?=?Microsoft.Office.Interop.Excel;
using?System.IO;//為了File
using?System.Reflection;
using?System.Data;//為了使用datatable
using?System.Windows.Forms;//為了使用datagridview
//對類里面函數訪問的方式有兩種:通過實例化對象訪問非靜態函數;通過類名訪問靜態函數。此處采用實例化。
/***********************************************************************************
??????????????????????????????????針對有模板的情況?
?***********************************************************************************/
class?ClassExcelbase
{
????public?ClassExcelbase(object?TemplateFilePath?int?ExcelSheetID?object?OutputFilePath)
????{
????????this.TemplateFilePath?=?TemplateFilePath;
????????this.ExcelSheetID?=?ExcelSheetID;
????????this.OutputFilePath?=?OutputFilePath;
????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????7514??2012-02-18?15:18??ClassExcelba
-----------?---------??----------?-----??----
?????????????????7514????????????????????1
- 上一篇:C#后臺編寫網頁瀏覽器CefSharp
- 下一篇:廣聯達無驅寫鎖深思S4
評論
共有 條評論