資源簡介
NPOI操作Excel
代碼片段和文件信息
using?System.Data;
using?System.IO;
using?System.Text;
using?System.Web;
using?NPOI.HSSF.UserModel;
using?NPOI.SS.UserModel;
using?NPOI;
///?
///?使用NPOI操作Excel,無需Office?COM組件
namespace?SourcePlatform.Business
{
????public?class?ExcelRender
????{
????????#region?導出
????????///?
????????///?根據Excel列類型獲取列的值
????????///?
????????///?Excel列
????????///?
????????private?static?string?GetCellValue(ICell?cell)
????????{
????????????if?(cell?==?null)
????????????????return?string.Empty;
????????????switch?(cell.CellType)
????????????{
????????????????case?CellType.BLANK:
????????????????????return?string.Empty;
????????????????case?CellType.BOOLEAN:
????????????????????return?cell.BooleanCellVa
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????23788??2013-12-07?10:11??ExcelRender.cs
?????文件?????1281536??2011-11-02?05:32??NPOI.dll
評論
共有 條評論