Table of Contents

Class ConfigurationExtensions

Namespace
WeihanLi.Npoi
Assembly
WeihanLi.Npoi.dll
public static class ConfigurationExtensions
Inheritance
ConfigurationExtensions
Inherited Members

Methods

HasAuthor(IExcelConfiguration, string)

Configure excel author

public static IExcelConfiguration HasAuthor(this IExcelConfiguration configuration, string author)

Parameters

configuration IExcelConfiguration

excel configuration

author string

excel document author name

Returns

IExcelConfiguration

current excel configurationIExcelConfiguration

HasCategory(IExcelConfiguration, string)

Configure excel author

public static IExcelConfiguration HasCategory(this IExcelConfiguration configuration, string category)

Parameters

configuration IExcelConfiguration

excel configuration

category string

excel document category

Returns

IExcelConfiguration

current excel configurationIExcelConfiguration

HasColumnOutputFormatter<TEntity, TProperty>(IPropertyConfiguration<TEntity, TProperty>, Func<TProperty?, object?>?)

has column output formatter

public static IPropertyConfiguration<TEntity, TProperty> HasColumnOutputFormatter<TEntity, TProperty>(this IPropertyConfiguration<TEntity, TProperty> configuration, Func<TProperty?, object?>? formatter)

Parameters

configuration IPropertyConfiguration<TEntity, TProperty>

property configuration

formatter Func<TProperty, object>

column output formatter

Returns

IPropertyConfiguration<TEntity, TProperty>

property configuration

Type Parameters

TEntity

entity type

TProperty

property type

HasCompany(IExcelConfiguration, string)

Configure excel author

public static IExcelConfiguration HasCompany(this IExcelConfiguration configuration, string company)

Parameters

configuration IExcelConfiguration

excel configuration

company string

excel document company

Returns

IExcelConfiguration

current excel configurationIExcelConfiguration

HasDescription(IExcelConfiguration, string)

Configure excel author

public static IExcelConfiguration HasDescription(this IExcelConfiguration configuration, string description)

Parameters

configuration IExcelConfiguration

excel configuration

description string

excel document description

Returns

IExcelConfiguration

current excel configurationIExcelConfiguration

HasSheetConfiguration(IExcelConfiguration, int, string)

Sheet Configuration

public static IExcelConfiguration HasSheetConfiguration(this IExcelConfiguration configuration, int sheetIndex, string sheetName)

Parameters

configuration IExcelConfiguration

excel configuration

sheetIndex int

sheetIndex

sheetName string

sheetName

Returns

IExcelConfiguration

current excel configuration

HasSheetConfiguration(IExcelConfiguration, int, string, bool)

Sheet Configuration

public static IExcelConfiguration HasSheetConfiguration(this IExcelConfiguration configuration, int sheetIndex, string sheetName, bool enableAutoColumnWidth)

Parameters

configuration IExcelConfiguration

excel configuration

sheetIndex int

sheetIndex

sheetName string

sheetName

enableAutoColumnWidth bool

enable auto column width if true otherwise false

Returns

IExcelConfiguration

current excel configuration

HasSheetConfiguration(IExcelConfiguration, int, string, int)

Sheet Configuration

public static IExcelConfiguration HasSheetConfiguration(this IExcelConfiguration configuration, int sheetIndex, string sheetName, int startRowIndex)

Parameters

configuration IExcelConfiguration

excel configuration

sheetIndex int

sheetIndex

sheetName string

sheetName

startRowIndex int

startRowIndex

Returns

IExcelConfiguration

current excel configuration

HasSheetConfiguration(IExcelConfiguration, int, string, int, bool, int?)

Sheet Configuration

public static IExcelConfiguration HasSheetConfiguration(this IExcelConfiguration configuration, int sheetIndex, string sheetName, int startRowIndex, bool enableAutoColumnWidth, int? endRowIndex = null)

Parameters

configuration IExcelConfiguration

excel configuration

sheetIndex int

sheetIndex

sheetName string

sheetName

startRowIndex int

startRowIndex

enableAutoColumnWidth bool

enable auto column width if true otherwise false

endRowIndex int?

endRowIndex, set this if you wanna control where to end(included)

Returns

IExcelConfiguration

current excel configurationIExcelConfiguration

HasSubject(IExcelConfiguration, string)

Configure excel author

public static IExcelConfiguration HasSubject(this IExcelConfiguration configuration, string subject)

Parameters

configuration IExcelConfiguration

excel configuration

subject string

excel document subject

Returns

IExcelConfiguration

current excel configurationIExcelConfiguration

HasTitle(IExcelConfiguration, string)

Configure excel author

public static IExcelConfiguration HasTitle(this IExcelConfiguration configuration, string title)

Parameters

configuration IExcelConfiguration

excel configuration

title string

excel document title

Returns

IExcelConfiguration

current excel configurationIExcelConfiguration

Property<TEntity>(IExcelConfiguration<TEntity>, string)

property configuration

public static IPropertyConfiguration<TEntity, string> Property<TEntity>(this IExcelConfiguration<TEntity> excelConfiguration, string propertyName)

Parameters

excelConfiguration IExcelConfiguration<TEntity>

excelConfiguration

propertyName string

propertyName

Returns

IPropertyConfiguration<TEntity, string>

PropertyConfiguration

Type Parameters

TEntity

TEntity

WithValidator<TEntity>(IExcelConfiguration<TEntity>, IValidator<TEntity>)

excel data validator

public static IExcelConfiguration<TEntity> WithValidator<TEntity>(this IExcelConfiguration<TEntity> configuration, IValidator<TEntity> validator)

Parameters

configuration IExcelConfiguration<TEntity>

configuration

validator IValidator<TEntity>

validator

Returns

IExcelConfiguration<TEntity>

current configuration

Type Parameters

TEntity

entity type