Class ConfigurationExtensions
Inheritance
Inherited Members
Namespace: WeihanLi.Npoi
Assembly: cs.temp.dll.dll
Syntax
public static class ConfigurationExtensions
Methods
HasAuthor(IExcelConfiguration, String)
Configure excel author
Declaration
public static IExcelConfiguration HasAuthor(this IExcelConfiguration configuration, string author)
Parameters
Type | Name | Description |
---|---|---|
IExcelConfiguration | configuration | excel configuration |
System.String | author | excel document author name |
Returns
Type | Description |
---|---|
IExcelConfiguration | current excel configuration |
HasCategory(IExcelConfiguration, String)
Configure excel author
Declaration
public static IExcelConfiguration HasCategory(this IExcelConfiguration configuration, string category)
Parameters
Type | Name | Description |
---|---|---|
IExcelConfiguration | configuration | excel configuration |
System.String | category | excel document category |
Returns
Type | Description |
---|---|
IExcelConfiguration | current excel configuration |
HasColumnOutputFormatter<TEntity, TProperty>(IPropertyConfiguration<TEntity, TProperty>, Func<TProperty, Object>)
has column output formatter
Declaration
public static IPropertyConfiguration<TEntity, TProperty> HasColumnOutputFormatter<TEntity, TProperty>(this IPropertyConfiguration<TEntity, TProperty> configuration, Func<TProperty, object> formatter)
Parameters
Type | Name | Description |
---|---|---|
IPropertyConfiguration<TEntity, TProperty> | configuration | property configuration |
System.Func<TProperty, System.Object> | formatter | column output formatter |
Returns
Type | Description |
---|---|
IPropertyConfiguration<TEntity, TProperty> | property configuration |
Type Parameters
Name | Description |
---|---|
TEntity | entity type |
TProperty | property type |
HasCompany(IExcelConfiguration, String)
Configure excel author
Declaration
public static IExcelConfiguration HasCompany(this IExcelConfiguration configuration, string company)
Parameters
Type | Name | Description |
---|---|---|
IExcelConfiguration | configuration | excel configuration |
System.String | company | excel document company |
Returns
Type | Description |
---|---|
IExcelConfiguration | current excel configuration |
HasDescription(IExcelConfiguration, String)
Configure excel author
Declaration
public static IExcelConfiguration HasDescription(this IExcelConfiguration configuration, string description)
Parameters
Type | Name | Description |
---|---|---|
IExcelConfiguration | configuration | excel configuration |
System.String | description | excel document description |
Returns
Type | Description |
---|---|
IExcelConfiguration | current excel configuration |
HasSheetConfiguration(IExcelConfiguration, Int32, String)
Sheet Configuration
Declaration
public static IExcelConfiguration HasSheetConfiguration(this IExcelConfiguration configuration, int sheetIndex, string sheetName)
Parameters
Type | Name | Description |
---|---|---|
IExcelConfiguration | configuration | excel configuration |
System.Int32 | sheetIndex | sheetIndex |
System.String | sheetName | sheetName |
Returns
Type | Description |
---|---|
IExcelConfiguration | current excel configuration |
HasSheetConfiguration(IExcelConfiguration, Int32, String, Boolean)
Sheet Configuration
Declaration
public static IExcelConfiguration HasSheetConfiguration(this IExcelConfiguration configuration, int sheetIndex, string sheetName, bool enableAutoColumnWidth)
Parameters
Type | Name | Description |
---|---|---|
IExcelConfiguration | configuration | excel configuration |
System.Int32 | sheetIndex | sheetIndex |
System.String | sheetName | sheetName |
System.Boolean | enableAutoColumnWidth | enable auto column width if true otherwise false |
Returns
Type | Description |
---|---|
IExcelConfiguration | current excel configuration |
HasSheetConfiguration(IExcelConfiguration, Int32, String, Int32)
Sheet Configuration
Declaration
public static IExcelConfiguration HasSheetConfiguration(this IExcelConfiguration configuration, int sheetIndex, string sheetName, int startRowIndex)
Parameters
Type | Name | Description |
---|---|---|
IExcelConfiguration | configuration | excel configuration |
System.Int32 | sheetIndex | sheetIndex |
System.String | sheetName | sheetName |
System.Int32 | startRowIndex | startRowIndex |
Returns
Type | Description |
---|---|
IExcelConfiguration | current excel configuration |
HasSheetConfiguration(IExcelConfiguration, Int32, String, Int32, Boolean, Nullable<Int32>)
Sheet Configuration
Declaration
public static IExcelConfiguration HasSheetConfiguration(this IExcelConfiguration configuration, int sheetIndex, string sheetName, int startRowIndex, bool enableAutoColumnWidth, int? endRowIndex = null)
Parameters
Type | Name | Description |
---|---|---|
IExcelConfiguration | configuration | excel configuration |
System.Int32 | sheetIndex | sheetIndex |
System.String | sheetName | sheetName |
System.Int32 | startRowIndex | startRowIndex |
System.Boolean | enableAutoColumnWidth | enable auto column width if true otherwise false |
System.Nullable<System.Int32> | endRowIndex | endRowIndex, set this if you wanna control where to end(included) |
Returns
Type | Description |
---|---|
IExcelConfiguration | current excel configuration |
HasSubject(IExcelConfiguration, String)
Configure excel author
Declaration
public static IExcelConfiguration HasSubject(this IExcelConfiguration configuration, string subject)
Parameters
Type | Name | Description |
---|---|---|
IExcelConfiguration | configuration | excel configuration |
System.String | subject | excel document subject |
Returns
Type | Description |
---|---|
IExcelConfiguration | current excel configuration |
HasTitle(IExcelConfiguration, String)
Configure excel author
Declaration
public static IExcelConfiguration HasTitle(this IExcelConfiguration configuration, string title)
Parameters
Type | Name | Description |
---|---|---|
IExcelConfiguration | configuration | excel configuration |
System.String | title | excel document title |
Returns
Type | Description |
---|---|
IExcelConfiguration | current excel configuration |
Property<TEntity>(IExcelConfiguration<TEntity>, String)
property configuration
Declaration
public static IPropertyConfiguration<TEntity, string> Property<TEntity>(this IExcelConfiguration<TEntity> excelConfiguration, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
IExcelConfiguration<TEntity> | excelConfiguration | excelConfiguration |
System.String | propertyName | propertyName |
Returns
Type | Description |
---|---|
IPropertyConfiguration<TEntity, System.String> | PropertyConfiguration |
Type Parameters
Name | Description |
---|---|
TEntity | TEntity |