C# Class HYPDM.BaseControl.ExportToExcelProvider

标题:将 DataSet, DataTable 导出到 Excel 作者:肖小勇 日期:2012-07-01 描述:对之前做的导出 Excel 做调整以支持对 DataSet 及 DataTable 的导出; DataSet 导出时可以指定需要导出的 DataTable DataTable 导出时可以指定需要导出的 DataColumn 及自定义导出后的列名
Show file Open project: huayancreate/HYPDM Class Usage Examples

Public Methods

Method Description
ExportToExcel ( DataSet fDataSet, String fFileName ) : void

ExportToExcel ( DataTable fDataTable, String fFileName ) : void
ExportToExcel ( DataTableExportOptions fOption, String fFileName ) : void
ExportToExcel ( List fOptions, String fFileName ) : void

将 DataTable 导出到 Excel

Private Methods

Method Description
ExportToExcel ( Excel fApplication, Excel fWorkBook, Excel worksheet, DataTableExportOptions fOption ) : void

将 DataTable 导出到 Excel

GetExcelCellName ( int fColIndex ) : string
GetExcelCellName ( int fColIndex, int fRowIndex ) : string

Method Details

ExportToExcel() public static method

public static ExportToExcel ( DataSet fDataSet, String fFileName ) : void
fDataSet System.Data.DataSet
fFileName String
return void

ExportToExcel() public static method

public static ExportToExcel ( DataTable fDataTable, String fFileName ) : void
fDataTable System.Data.DataTable
fFileName String
return void

ExportToExcel() public static method

public static ExportToExcel ( DataTableExportOptions fOption, String fFileName ) : void
fOption DataTableExportOptions
fFileName String
return void

ExportToExcel() public static method

将 DataTable 导出到 Excel
public static ExportToExcel ( List fOptions, String fFileName ) : void
fOptions List
fFileName String
return void