Nucleus .Net Core CMS

Excel.ExcelWriter Class

Namespace: Nucleus.Extensions.Excel
Assembly: Nucleus.Extensions.dll
Non-generic exporter.

Constructors

Nucleus.Extensions.Excel.ExcelWriter Constructor

Nucleus.Extensions.Excel.ExcelWriter ()
Constructor, used by the generic ExcelWriter<T> class.

Nucleus.Extensions.Excel.ExcelWriter Constructor

Nucleus.Extensions.Excel.ExcelWriter (IXLWorksheet worksheet)
Use this constructor if you want to create columns and output rows manually. The generic Excel.ExcelWriter<TModel> class can auto-detect columns.
Parameters
Name Type
worksheet ClosedXML.Excel.IXLWorksheet

Methods

GetOutputStream

GetOutputStream ()
Return the spreadsheet as a stream.

WriteHeadingRow

WriteHeadingRow ()
Write the heading row.

WriteRow (Object[]) Method

WriteRow (Object[] values)
Write the specified values to the next row of the current worksheet.
Parameters
Name Type
values Object[]

WriteRow (IEnumerable<Object>) Method

WriteRow (IEnumerable<Object> values)
Write the specified values to the next row of the current worksheet.
Parameters
Name Type
values System.Collections.Generic.IEnumerable<System.Object>

ListToString (IList) Method

ListToString (IList value)
Convert a list of items to a comma-separated string.
Parameters
Name Type
value System.Collections.IList

AdjustColumnWidths

AdjustColumnWidths ()
Automatically expand column widths to fit content.