C# 클래스 ExcelExtensions, code

파일 보기 프로젝트 열기: shendongnian/code 1 사용 예제들

공개 메소드들

메소드 설명
GetAttributeFrom ( object instance, string propertyName ) : T,

Get's an attribute from any given property

GetDownload ( NPOI.HSSF.UserModel.HSSFWorkbook file, string fileName ) : FileStreamResult,

Converts the NPOI workbook into a byte array for download

ToExcel ( IEnumerable, rows, string sheetName ) : FileStreamResult,

Creates an Excel document from any IEnumerable returns a memory stream

메소드 상세

GetAttributeFrom() 공개 정적인 메소드

Get's an attribute from any given property
public static GetAttributeFrom ( object instance, string propertyName ) : T,
instance object
propertyName string
리턴 T,

GetDownload() 공개 정적인 메소드

Converts the NPOI workbook into a byte array for download
public static GetDownload ( NPOI.HSSF.UserModel.HSSFWorkbook file, string fileName ) : FileStreamResult,
file NPOI.HSSF.UserModel.HSSFWorkbook
fileName string
리턴 FileStreamResult,

ToExcel() 공개 정적인 메소드

Creates an Excel document from any IEnumerable returns a memory stream
public static ToExcel ( IEnumerable, rows, string sheetName ) : FileStreamResult,
rows IEnumerable, IEnumerable that will be converted into an Excel worksheet
sheetName string Name of the Ecel Sheet
리턴 FileStreamResult,