DataWeb
Search Results for

    Show / Hide Table of Contents

    Class EPPlusService

    Inheritance
    object
    EPPlusService
    Implements
    IExcelService
    IEPPlusService
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: DataWeb.Data.Exchange.EPPlus
    Assembly: DataWeb.Data.Exchange.EPPlus.dll
    Syntax
    public class EPPlusService : IExcelService, IEPPlusService

    Methods

    DictionaryListToStreamAsync(IEnumerable<Dictionary<string, object>>, string, CancellationToken)

    Converts a list of dictionaries to an Excel file and returns it as a stream.

    Declaration
    public Task<Stream> DictionaryListToStreamAsync(IEnumerable<Dictionary<string, object>> dictionaryList, string dataName, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IEnumerable<Dictionary<string, object>> dictionaryList

    The list of dictionaries to convert to an Excel file.

    string dataName

    The name of the data to include in the Excel file.

    CancellationToken cancellationToken
    Returns
    Type Description
    Task<Stream>

    A stream that contains the Excel file.

    DictionaryListToWorksheet(ExcelPackage, IEnumerable<Dictionary<string, object>>, string)

    Declaration
    public ExcelWorksheet DictionaryListToWorksheet(ExcelPackage package, IEnumerable<Dictionary<string, object>> dictionaryList, string worksheetName)
    Parameters
    Type Name Description
    ExcelPackage package
    IEnumerable<Dictionary<string, object>> dictionaryList
    string worksheetName
    Returns
    Type Description
    ExcelWorksheet

    ListToStreamAsync(IEnumerable, string, CancellationToken)

    Converts a list of objects to an Excel file and returns it as a stream.

    Declaration
    public Task<Stream> ListToStreamAsync(IEnumerable list, string dataName, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IEnumerable list

    The list of objects to convert to an Excel file.

    string dataName

    The name of the data to include in the Excel file.

    CancellationToken cancellationToken
    Returns
    Type Description
    Task<Stream>

    A stream that contains the Excel file.

    ListToWorksheet(ExcelPackage, IEnumerable, string)

    Declaration
    public ExcelWorksheet ListToWorksheet(ExcelPackage package, IEnumerable list, string worksheetName)
    Parameters
    Type Name Description
    ExcelPackage package
    IEnumerable list
    string worksheetName
    Returns
    Type Description
    ExcelWorksheet

    StreamToExcelDataAsync(Stream, CancellationToken)

    Reads an Excel file from a stream and returns its data.

    Declaration
    public Task<ExcelData> StreamToExcelDataAsync(Stream stream, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    Stream stream

    The stream to read the Excel file from.

    CancellationToken cancellationToken
    Returns
    Type Description
    Task<ExcelData>

    An ExcelData object that contains the data extracted from the Excel file.

    WorksheetToExcelData(ExcelPackage)

    Declaration
    public ExcelData WorksheetToExcelData(ExcelPackage package)
    Parameters
    Type Name Description
    ExcelPackage package
    Returns
    Type Description
    ExcelData

    Implements

    IExcelService
    IEPPlusService
    In this article
    Back to top Generated by DocFX