PageSetupImpl Class
This Class allows the user to configure Print settings of a document.
Inherited Members
Namespace: Syncfusion.XlsIO.Implementation
Assembly: Syncfusion.XlsIO.Base.dll
Syntax
public class PageSetupImpl : PageSetupBaseImpl, IDisposable, IBiffStorage, IPageSetup, IPageSetupBase, IParentApplication
Constructors
PageSetupImpl(IApplication, Object)
Sets application and parent fields.
Declaration
public PageSetupImpl(IApplication application, object parent)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Application object for the page setup. |
System.Object | parent | Parent object for the page setup. |
Properties
DefaultRowHeight
Gets / sets default row height.
Declaration
public int DefaultRowHeight { get; set; }
Property Value
Type |
---|
System.Int32 |
DefaultRowHeightFlag
Gets / sets default row height option flag.
Declaration
public bool DefaultRowHeightFlag { get; set; }
Property Value
Type |
---|
System.Boolean |
HPageBreaks
Gets horizontal page break.
Declaration
public HPageBreaksCollection HPageBreaks { get; }
Property Value
Type |
---|
Syncfusion.XlsIO.Implementation.Collections.HPageBreaksCollection |
IsFitToPage
Indicates whether fit to page mode is selected.
Declaration
public override bool IsFitToPage { get; set; }
Property Value
Type |
---|
System.Boolean |
Overrides
IsSummaryColumnRight
Indicates whether summary columns will appear right of the detail in outlines.
Declaration
public bool IsSummaryColumnRight { get; set; }
Property Value
Type |
---|
System.Boolean |
IsSummaryRowBelow
Indicates whether summary rows will appear below detail in outlines.
Declaration
public bool IsSummaryRowBelow { get; set; }
Property Value
Type |
---|
System.Boolean |
PrintArea
Returns or sets the range to be printed, as a string using A1-style references in the language of the macro. Read/write String.
Declaration
public string PrintArea { get; set; }
Property Value
Type |
---|
System.String |
PrintGridlines
True if cell gridlines are printed on the page. Applies only to worksheets. Read/write Boolean.
Declaration
public bool PrintGridlines { get; set; }
Property Value
Type |
---|
System.Boolean |
Remarks
To know more about page settings refer this link.
Examples
The following code illustrates the use of PrintGridlines property.
using (ExcelEngine excelEngine = new ExcelEngine())
{
//Create a worksheet.
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Excel2013;
IWorkbook workbook = application.Workbooks.Create(1);
IWorksheet sheet = workbook.Worksheets[0];
sheet.Range["A1:M20"].Text = "PagePrint";
sheet.Range["A1:M1"].Text = "Page";
sheet.Range["C1:C20"].Text = "Page";
//True to cell gridlines are printed on the page
sheet.PageSetup.PrintGridlines = true;
workbook.SaveAs("PageSetup.xlsx");
workbook.Close();
}
PrintHeadings
True if row and column headings are printed with this page. Applies only to worksheets. Read/write Boolean.
Declaration
public bool PrintHeadings { get; set; }
Property Value
Type |
---|
System.Boolean |
PrintTitleColumns
Returns or sets the columns that contain the cells to be repeated on the left side of each page, as a string in A1-style notation in the language of the macro. Read/write String.
Declaration
public string PrintTitleColumns { get; set; }
Property Value
Type |
---|
System.String |
PrintTitleRows
Returns or sets the rows that contain the cells to be repeated at the top of each page, as a string in A1-style notation in the language of the macro. Read/write String.
Declaration
public string PrintTitleRows { get; set; }
Property Value
Type |
---|
System.String |
RelationId
Gets / sets relation id to the printer settings part.
Declaration
public string RelationId { get; set; }
Property Value
Type |
---|
System.String |
VPageBreaks
Gets vertical page break.
Declaration
public VPageBreaksCollection VPageBreaks { get; }
Property Value
Type |
---|
Syncfusion.XlsIO.Implementation.Collections.VPageBreaksCollection |
Worksheet
Returns parent worksheet. Read-only.
Declaration
public WorksheetImpl Worksheet { get; }
Property Value
Type |
---|
WorksheetImpl |
Methods
Clone(Object)
Creates copy of the current instance.
Declaration
public PageSetupImpl Clone(object parent)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parent | Parent for the new instance. |
Returns
Type | Description |
---|---|
PageSetupImpl | A clone of the current instance. |
ConvertTo3dRangeName(String)
Converts cell range to 3d Range name.
Declaration
protected string ConvertTo3dRangeName(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | cell range. |
Returns
Type | Description |
---|---|
System.String | 3d range name. |
Dispose()
Dispose Page Setup
Declaration
public override void Dispose()
Overrides
ExtractPrintArea()
Extracts print area string.
Declaration
protected string ExtractPrintArea()
Returns
Type | Description |
---|---|
System.String | Print area string. |
ExtractPrintTitleRowColumn(Boolean)
Extracts row or column print title from default title named range.
Declaration
protected string ExtractPrintTitleRowColumn(bool bRowExtract)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | bRowExtract | Defines which print title must be extracted. |
Returns
Type | Description |
---|---|
System.String | Row/column print title string. |
FillGutsRecord()
Fills internal guts record with information from Rows and ColumnInfo records.
Declaration
protected void FillGutsRecord()
FindParents()
Find parent worksheet.
Declaration
protected override void FindParents()
Overrides
Exceptions
Type | Condition |
---|---|
System.ArgumentException | When can't find parent worksheet. |
GetStoreSize(ExcelVersion)
Size of the required storage space. Read-only.
Declaration
public override int GetStoreSize(ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
ExcelVersion | version | Represents Excel version. |
Returns
Type |
---|
System.Int32 |
Overrides
ParsePrintAreaExpression(String)
Parses print area expression.
Declaration
protected void ParsePrintAreaExpression(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | Value representing print area. |
ParsePrintTitleColumns(String)
Parses column print title string and makes appropriate changes to default title named range.
Declaration
protected void ParsePrintTitleColumns(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | Column print title string to set. |
ParsePrintTitleRows(String)
Parses row print title string and makes appropriate changes to default title named range.
Declaration
protected void ParsePrintTitleRows(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | Row print title string to set. |