SpreadsheetOption
Definition
Namespace: Surya.Ab.Export.Client.Models
Assembly: Surya.Ab.Export.dll
Provides the optional arguments needed each sheet in Excel for Export.
public class SpreadsheetOption
Properties
Name | Definition |
---|---|
Header | Header for the Sheet |
Footer | Footer for the Footer |
SheetName | Name of the Sheet |
SheetStyle | Style properties for the Sheet |
HeaderMergeCellCount | Numbers of cells to be merged to Display SheetHeader |
FooterMergeCellCount | Numbers of cells to be merged to Display SheetFooter |
FreezeRowCount | Numbers of rows to freeze in a sheet |
FreezeColumnCount | Numbers of columns to freeze in a sheet |
GridView | Bool property for GridView |
MaxColumnWidth | Maximum width a column can have |
MinColumnWidth | Minimum width a column must have |
ClientLogo | To set footer with image of ClientLogo |
Structure
public class SpreadsheetOption
{
public string? Header { get; set; }
public string? Footer { get; set; }
public string? SheetName { get; set; }
public int HeaderMergeCellCount { get; set; }
public int FooterMergeCellCount { get; set; }
public int FreezeRowCount { get; set; }
public int FreezeColumnCount { get; set; }
public SheetStyle? SheetStyle { get; set; }
public bool GridView { get; set; } = false;
public float MaxColumnWidth { get; set; }
public float MinColumnWidth { get; set; }
public FooterLogo? ClientLogo { get; set; }
}
Example
var spreadsheetOptions = new List<SpreadsheetOption>()
{
new SpreadsheetOption()
{
SheetName = "Sheet 1",
Header = "SheetHeader 1",
Footer = "SheetFooter 1"
},
new SpreadsheetOption()
{
SheetName = "Sheet 2",
Header = "SheetHeader 2",
Footer = "SheetFooter 2"
}
}