namespace com.azkoss.excellite { using System; /// ///Excel worksheet is a table with additional properties, identified by a unique name. /// /// ///

///Worksheet in Microsoft Excel has limited size. ///Number of rows (ExcelRow) is limited ///to ExcelFile.MaxRows. ///Number of columns (ExcelColumn) is limited ///to ExcelFile.MaxColumns. ///A specific cell (ExcelCell) can be accessed either trough ///ExcelRow.Cells, ///ExcelColumn.Cells or ///ExcelWorksheet.Cells property. ///Whichever property used, there are two distinct methods of getting a cell reference; using name ///and using index. For example, full name of cell in top left corner of a worksheet is "A1". Translated ///to indexes, same cell would be 0,0 (zero row and zero column). If using ///ExcelRow.Cells or ///ExcelColumn.Cells to access a ///specific cell, only partial name or partial index must be used, providing unknown column or row information. ///

///
/// Look at following code for cell referencing examples: /// ///Dim ws As ExcelWorksheet = excelFile.Worksheets.ActiveWorksheet /// ///ws.Cells("B2").Value = "Cell B2." ///ws.Cells(6, 0).Value = "Cell in row 7 and column A." /// ///ws.Rows(2).Cells(0).Value = "Cell in row 3 and column A." ///ws.Rows("4").Cells("B").Value = "Cell in row 4 and column B." /// ///ws.Columns(2).Cells(4).Value = "Cell in column C and row 5." ///ws.Columns("AA").Cells("6").Value = "Cell in AA column and row 6." /// /// ///ExcelWorksheet ws = excelFile.Worksheets.ActiveWorksheet; /// ///ws.Cells["B2"].Value = "Cell B2."; ///ws.Cells[6,0].Value = "Cell in row 7 and column A."; /// ///ws.Rows[2].Cells[0].Value = "Cell in row 3 and column A."; ///ws.Rows["4"].Cells["B"].Value = "Cell in row 4 and column B."; /// ///ws.Columns[2].Cells[4].Value = "Cell in column C and row 5."; ///ws.Columns["AA"].Cells["6"].Value = "Cell in AA column and row 6."; /// /// /// /// /// public sealed class ExcelWorksheet { // Methods internal ExcelWorksheet(string name, ExcelWorksheetCollection parent) { this.defaultColumnWidth = 0x924; this.outlineRowButtonsBelow = true; this.outlineColumnButtonsRight = true; this.pageBreakViewZoom = 60; this.zoom = 100; this.windowOptions = WorksheetWindowOptions.ShowOutlineSymbols | (WorksheetWindowOptions.DefaultGridLineColor | (WorksheetWindowOptions.ShowGridLines | (WorksheetWindowOptions.ShowZeroValues | WorksheetWindowOptions.ShowSheetHeaders))); this.paperSize = 0; this.scalingFactor = 0xff; this.startPageNumber = 1; this.fitWorksheetWidthToPages = 0; this.fitWorksheetHeightToPages = 0; this.setupOptions = SetupOptions.Landscape; this.printResolution = 0; this.verticalPrintResolution = 0; this.headerMargin = 0.5; this.footerMargin = 0.5; this.numberOfCopies = 1; this.name = name; this.parent = parent; this.rows = new ExcelRowCollection(this); this.columns = new ExcelColumnCollection(this); this.mergedRanges = new MergedCellRanges(this); this.horizontalPageBreaks = new HorizontalPageBreakCollection(); this.verticalPageBreaks = new VerticalPageBreakCollection(); } internal ExcelWorksheet(string name, ExcelWorksheetCollection parent, ExcelWorksheet sourceWorksheet) { this.defaultColumnWidth = 0x924; this.outlineRowButtonsBelow = true; this.outlineColumnButtonsRight = true; this.pageBreakViewZoom = 60; this.zoom = 100; this.windowOptions = WorksheetWindowOptions.ShowOutlineSymbols | (WorksheetWindowOptions.DefaultGridLineColor | (WorksheetWindowOptions.ShowGridLines | (WorksheetWindowOptions.ShowZeroValues | WorksheetWindowOptions.ShowSheetHeaders))); this.paperSize = 0; this.scalingFactor = 0xff; this.startPageNumber = 1; this.fitWorksheetWidthToPages = 0; this.fitWorksheetHeightToPages = 0; this.setupOptions = SetupOptions.Landscape; this.printResolution = 0; this.verticalPrintResolution = 0; this.headerMargin = 0.5; this.footerMargin = 0.5; this.numberOfCopies = 1; this.name = name; this.parent = parent; this.protectedWorksheet = sourceWorksheet.protectedWorksheet; this.rows = new ExcelRowCollection(this, sourceWorksheet.rows); this.columns = new ExcelColumnCollection(this, sourceWorksheet.columns); this.defaultColumnWidth = sourceWorksheet.defaultColumnWidth; this.mergedRanges = new MergedCellRanges(this, sourceWorksheet.mergedRanges); this.outlineRowButtonsBelow = sourceWorksheet.outlineRowButtonsBelow; this.outlineColumnButtonsRight = sourceWorksheet.outlineColumnButtonsRight; if (sourceWorksheet.PreservedWorksheetRecords != null) { this.PreservedWorksheetRecords = new PreservedRecords(sourceWorksheet.PreservedWorksheetRecords); } this.windowOptions = sourceWorksheet.windowOptions & ((WorksheetWindowOptions) (-1537)); this.firstVisibleRow = sourceWorksheet.firstVisibleRow; this.firstVisibleColumn = sourceWorksheet.firstVisibleColumn; this.pageBreakViewZoom = sourceWorksheet.pageBreakViewZoom; this.zoom = sourceWorksheet.zoom; this.horizontalPageBreaks = new HorizontalPageBreakCollection(sourceWorksheet.horizontalPageBreaks); this.verticalPageBreaks = new VerticalPageBreakCollection(sourceWorksheet.verticalPageBreaks); this.paperSize = sourceWorksheet.paperSize; this.scalingFactor = sourceWorksheet.scalingFactor; this.startPageNumber = sourceWorksheet.startPageNumber; this.fitWorksheetWidthToPages = sourceWorksheet.fitWorksheetWidthToPages; this.fitWorksheetHeightToPages = sourceWorksheet.fitWorksheetHeightToPages; this.setupOptions = sourceWorksheet.setupOptions; this.printResolution = sourceWorksheet.printResolution; this.verticalPrintResolution = sourceWorksheet.verticalPrintResolution; this.headerMargin = sourceWorksheet.headerMargin; this.footerMargin = sourceWorksheet.footerMargin; this.numberOfCopies = sourceWorksheet.numberOfCopies; this.namedRanges = new NamedRangeCollection(this, sourceWorksheet.NamedRanges); } /// ///Deletes this worksheet from the workbook. /// public void Delete() { this.parent.DeleteInternal(this); } private bool GetWindowOption(WorksheetWindowOptions option) { return ((this.windowOptions & option) != ((WorksheetWindowOptions) ((short) 0))); } /// ///Inserts a copy of an existing worksheet before the current worksheet. /// ///Name of the new worksheet. ///Source worksheet. ///Newly created worksheet. public ExcelWorksheet InsertCopy(string destinationWorksheetName, ExcelWorksheet sourceWorksheet) { return this.parent.InsertCopyInternal(destinationWorksheetName, this.parent.IndexOf(this), sourceWorksheet); } /// ///Inserts an empty worksheet before the current worksheet. /// ///Worksheet name. ///Newly created worksheet. public ExcelWorksheet InsertEmpty(string worksheetName) { return this.parent.InsertInternal(worksheetName, this.parent.IndexOf(this)); } private void SetWindowOption(bool val, WorksheetWindowOptions option) { this.windowOptions &= ~option; if (val) { this.windowOptions |= option; } } // Properties /// ///Scaling factor for automatic page breaks. /// /// ///

Unit is one percent. Value must be between 10 and 400.

///

Default value for this property is 255.

///

MS Excel inserts automatic page breaks depending on this scaling factor. ///Smaller it gets, bigger will be the distance between the two automatic page breaks.

///
///Thrown if value is out of 10 to 400 range. internal int AutomaticPageBreakScalingFactor { get { return this.scalingFactor; } set { if ((value < 10) || (value > 400)) { throw new ArgumentOutOfRangeException("value", value, "AutomaticPageBreakScalingFactor must be in range from 10 to 400."); } this.scalingFactor = value; } } /// ///Gets CellRange with all the cells ///(ExcelCell) ///in the worksheet. /// /// Look at following code for cell referencing examples: /// ///Dim ws As ExcelWorksheet = excelFile.Worksheets.ActiveWorksheet /// ///ws.Cells("B2").Value = "Cell B2." ///ws.Cells(6, 0).Value = "Cell in row 7 and column A." /// ///ws.Rows(2).Cells(0).Value = "Cell in row 3 and column A." ///ws.Rows("4").Cells("B").Value = "Cell in row 4 and column B." /// ///ws.Columns(2).Cells(4).Value = "Cell in column C and row 5." ///ws.Columns("AA").Cells("6").Value = "Cell in AA column and row 6." /// /// ///ExcelWorksheet ws = excelFile.Worksheets.ActiveWorksheet; /// ///ws.Cells["B2"].Value = "Cell B2."; ///ws.Cells[6,0].Value = "Cell in row 7 and column A."; /// ///ws.Rows[2].Cells[0].Value = "Cell in row 3 and column A."; ///ws.Rows["4"].Cells["B"].Value = "Cell in row 4 and column B."; /// ///ws.Columns[2].Cells[4].Value = "Cell in column C and row 5."; ///ws.Columns["AA"].Cells["6"].Value = "Cell in AA column and row 6."; /// /// public CellRange Cells { get { if (this.cells == null) { this.cells = new CellRange(this); } return this.cells; } } /// ///Gets collection of all columns (ExcelColumn) in the worksheet. /// public ExcelColumnCollection Columns { get { return this.columns; } } /// ///Gets or sets default column width. /// /// ///Unit is 1/256th of the width of the zero character in default font. This value is used as width for columns ///which don't have ExcelColumn.Width property explicitly set. /// ///ExcelColumn.Width public int DefaultColumnWidth { get { return this.defaultColumnWidth; } set { this.defaultColumnWidth = value; } } /// ///Index of the first visible column in the worksheet. /// /// ///Default value for this property is 0. /// public int FirstVisibleColumn { get { return this.firstVisibleColumn; } set { this.firstVisibleColumn = value; } } /// ///Index of the first visible row in the worksheet. /// /// ///Default value for this property is 0. /// public int FirstVisibleRow { get { return this.firstVisibleRow; } set { this.firstVisibleRow = value; } } /// ///Gets collection of all horizontal page breaks ///(HorizontalPageBreak) in the worksheet. /// public HorizontalPageBreakCollection HorizontalPageBreaks { get { return this.horizontalPageBreaks; } } internal MergedCellRanges MergedRanges { get { return this.mergedRanges; } set { this.mergedRanges = value; } } /// ///Gets or sets worksheet name. /// /// ///If not unique (worksheet with that name already exists in ///ExcelFile.Worksheets collection) exception is thrown. /// ///Thrown if worksheet name is not unique. public string Name { get { return this.name; } set { this.parent.ExceptionIfNotUnique(value); this.name = value; } } /// ///Gets NamedRangeCollection ///containing descriptive names which are used to represent cells, ranges of cells, ///formulas, or constant values. /// /// ///You can use the labels of columns and rows on a worksheet to refer to the cells within ///those columns and rows. Or you can create descriptive names to represent cells, ranges of cells, ///formulas, or constant values. Labels can be used in formulas that refer to data on the same ///worksheet; if you want to represent a range on another worksheet, use a name. ///You can also create 3-D names that represent the same cell or range of cells across multiple worksheets. /// ///Following code demonstrates how to use formulas and named ranges. It shows next features: ///cell references (both absolute and relative), unary and binary operators, constand operands (integer and floating point), ///functions and named cell ranges. /// ///ws.Cells("A1").Value = 5 ///ws.Cells("A2").Value = 6 ///ws.Cells("A3").Value = 10 /// ///ws.Cells("C1").Formula = "=A1+A2" ///ws.Cells("C2").Formula = "=$A$1-A3" ///ws.Cells("C3").Formula = "=COUNT(A1:A3)" ///ws.Cells("C4").Formula = "=AVERAGE($A$1:$A$3)" ///ws.Cells("C5").Formula = "=SUM(A1:A3,2,3)" ///ws.Cells("C7").Formula = "= 123 - (-(-(23.5)))" /// ///ws.NamedRanges.Add("DataRange", ws.Cells.GetSubrange("A1", "A3")) ///ws.Cells("C8").Formula = "=MAX(DataRange)" /// ///Dim cr As CellRange = ws.Cells.GetSubrange("B9","C10") ///cr.Merged = True ///cr.Formula = "=A1*25" /// /// ///ws.Cells["A1"].Value = 5; ///ws.Cells["A2"].Value = 6; ///ws.Cells["A3"].Value = 10; /// ///ws.Cells["C1"].Formula = "=A1+A2"; ///ws.Cells["C2"].Formula = "=$A$1-A3"; ///ws.Cells["C3"].Formula = "=COUNT(A1:A3)"; ///ws.Cells["C4"].Formula = "=AVERAGE($A$1:$A$3)"; ///ws.Cells["C5"].Formula = "=SUM(A1:A3,2,3)"; ///ws.Cells["C7"].Formula = "= 123 - (-(-(23.5)))"; /// ///ws.NamedRanges.Add("DataRange", ws.Cells.GetSubrange("A1", "A3")); ///ws.Cells["C8"].Formula = "=MAX(DataRange)"; /// ///CellRange cr = ws.Cells.GetSubrange("B9", "C10"); ///cr.Merged = true; ///cr.Formula = "=A1*25"; /// /// ///ExcelCell.Formula public NamedRangeCollection NamedRanges { get { if (this.namedRanges == null) { this.namedRanges = new NamedRangeCollection(this); } return this.namedRanges; } } /// ///Gets or sets whether outline column buttons are displayed on the right side of groups. /// /// ///This property is simply written to Excel file and has no effect on behavior of this library. ///For more information on worksheet protection, consult Microsoft Excel documentation. /// /// Following code creates two horizontal groups and one vertical group. Horizontal groups have ///outline button above (default is below), while vertical group is collapsed. /// ///Sub GroupingSample(ByVal ws As ExcelWorksheet) ///ws.Cells(0, 0).Value = "Grouping and outline example:" /// ///' Vertical grouping. ///ws.Cells(2, 0).Value = "GroupA Start" ///ws.Rows(2).OutlineLevel = 1 ///ws.Cells(3, 0).Value = "A" ///ws.Rows(3).OutlineLevel = 1 ///ws.Cells(4, 1).Value = "GroupB Start" ///ws.Rows(4).OutlineLevel = 2 ///ws.Cells(5, 1).Value = "B" ///ws.Rows(5).OutlineLevel = 2 ///ws.Cells(6, 1).Value = "GroupB End" ///ws.Rows(6).OutlineLevel = 2 ///ws.Cells(7, 0).Value = "GroupA End" ///ws.Rows(7).OutlineLevel = 1 ///' Put outline row buttons above groups. ///ws.OutlineRowButtonsBelow = False /// ///' Horizontal grouping (collapsed). ///ws.Cells("E2").Value = "Gr.C Start" ///ws.Columns("E").OutlineLevel = 1 ///ws.Columns("E").Collapsed = True ///ws.Cells("F2").Value = "C" ///ws.Columns("F").OutlineLevel = 1 ///ws.Columns("F").Collapsed = True ///ws.Cells("G2").Value = "Gr.C End" ///ws.Columns("G").OutlineLevel = 1 ///ws.Columns("G").Collapsed = True ///End Sub /// /// ///static void GroupingSample(ExcelWorksheet ws) ///{ ///ws.Cells[0,0].Value = "Grouping and outline example:"; /// ///// Vertical grouping. ///ws.Cells[2,0].Value = "GroupA Start"; ///ws.Rows[2].OutlineLevel = 1; ///ws.Cells[3,0].Value = "A"; ///ws.Rows[3].OutlineLevel = 1; ///ws.Cells[4,1].Value = "GroupB Start"; ///ws.Rows[4].OutlineLevel = 2; ///ws.Cells[5,1].Value = "B"; ///ws.Rows[5].OutlineLevel = 2; ///ws.Cells[6,1].Value = "GroupB End"; ///ws.Rows[6].OutlineLevel = 2; ///ws.Cells[7,0].Value = "GroupA End"; ///ws.Rows[7].OutlineLevel = 1; ///// Put outline row buttons above groups. ///ws.OutlineRowButtonsBelow = false; /// ///// Horizontal grouping (collapsed). ///ws.Cells["E2"].Value = "Gr.C Start"; ///ws.Columns["E"].OutlineLevel = 1; ///ws.Columns["E"].Collapsed = true; ///ws.Cells["F2"].Value = "C"; ///ws.Columns["F"].OutlineLevel = 1; ///ws.Columns["F"].Collapsed = true; ///ws.Cells["G2"].Value = "Gr.C End"; ///ws.Columns["G"].OutlineLevel = 1; ///ws.Columns["G"].Collapsed = true; ///} /// /// ///ExcelWorksheet.OutlineRowButtonsBelow /// /// public bool OutlineColumnButtonsRight { get { return this.outlineColumnButtonsRight; } set { this.outlineColumnButtonsRight = value; } } /// ///Gets or sets whether outline row buttons are displayed below groups. /// /// ///This property is simply written to Excel file and has no effect on behavior of this library. ///For more information on worksheet protection, consult Microsoft Excel documentation. /// /// Following code creates two horizontal groups and one vertical group. Horizontal groups have ///outline button above (default is below), while vertical group is collapsed. /// ///Sub GroupingSample(ByVal ws As ExcelWorksheet) ///ws.Cells(0, 0).Value = "Grouping and outline example:" /// ///' Vertical grouping. ///ws.Cells(2, 0).Value = "GroupA Start" ///ws.Rows(2).OutlineLevel = 1 ///ws.Cells(3, 0).Value = "A" ///ws.Rows(3).OutlineLevel = 1 ///ws.Cells(4, 1).Value = "GroupB Start" ///ws.Rows(4).OutlineLevel = 2 ///ws.Cells(5, 1).Value = "B" ///ws.Rows(5).OutlineLevel = 2 ///ws.Cells(6, 1).Value = "GroupB End" ///ws.Rows(6).OutlineLevel = 2 ///ws.Cells(7, 0).Value = "GroupA End" ///ws.Rows(7).OutlineLevel = 1 ///' Put outline row buttons above groups. ///ws.OutlineRowButtonsBelow = False /// ///' Horizontal grouping (collapsed). ///ws.Cells("E2").Value = "Gr.C Start" ///ws.Columns("E").OutlineLevel = 1 ///ws.Columns("E").Collapsed = True ///ws.Cells("F2").Value = "C" ///ws.Columns("F").OutlineLevel = 1 ///ws.Columns("F").Collapsed = True ///ws.Cells("G2").Value = "Gr.C End" ///ws.Columns("G").OutlineLevel = 1 ///ws.Columns("G").Collapsed = True ///End Sub /// /// ///static void GroupingSample(ExcelWorksheet ws) ///{ ///ws.Cells[0,0].Value = "Grouping and outline example:"; /// ///// Vertical grouping. ///ws.Cells[2,0].Value = "GroupA Start"; ///ws.Rows[2].OutlineLevel = 1; ///ws.Cells[3,0].Value = "A"; ///ws.Rows[3].OutlineLevel = 1; ///ws.Cells[4,1].Value = "GroupB Start"; ///ws.Rows[4].OutlineLevel = 2; ///ws.Cells[5,1].Value = "B"; ///ws.Rows[5].OutlineLevel = 2; ///ws.Cells[6,1].Value = "GroupB End"; ///ws.Rows[6].OutlineLevel = 2; ///ws.Cells[7,0].Value = "GroupA End"; ///ws.Rows[7].OutlineLevel = 1; ///// Put outline row buttons above groups. ///ws.OutlineRowButtonsBelow = false; /// ///// Horizontal grouping (collapsed). ///ws.Cells["E2"].Value = "Gr.C Start"; ///ws.Columns["E"].OutlineLevel = 1; ///ws.Columns["E"].Collapsed = true; ///ws.Cells["F2"].Value = "C"; ///ws.Columns["F"].OutlineLevel = 1; ///ws.Columns["F"].Collapsed = true; ///ws.Cells["G2"].Value = "Gr.C End"; ///ws.Columns["G"].OutlineLevel = 1; ///ws.Columns["G"].Collapsed = true; ///} /// /// ///ExcelWorksheet.OutlineColumnButtonsRight /// /// public bool OutlineRowButtonsBelow { get { return this.outlineRowButtonsBelow; } set { this.outlineRowButtonsBelow = value; } } /// ///Magnification factor in page break view. /// /// ///

Unit is one percent. Value must be between 10 and 400.

///

Default value for this property is 60.

///
///Thrown if value is out of 10 to 400 range. public int PageBreakViewZoom { get { return this.pageBreakViewZoom; } set { if ((value < 10) || (value > 400)) { throw new ArgumentOutOfRangeException("value", value, "PageBreakViewZoom must be in range from 10 to 400."); } this.pageBreakViewZoom = value; } } internal ExcelWorksheetCollection Parent { get { return this.parent; } } internal ExcelFile ParentExcelFile { get { return this.Parent.Parent; } } /// ///Gets or sets the worksheet protection flag. /// /// ///This property is simply written to Excel file and has no effect on the behavior of this library. ///For more information on worksheet protection, consult Microsoft Excel documentation. /// ///ExcelFile.Protected public bool Protected { get { return this.protectedWorksheet; } set { this.protectedWorksheet = value; } } /// ///Gets collection of all rows (ExcelRow) in the worksheet. /// public ExcelRowCollection Rows { get { return this.rows; } } /// ///If true, MS Excel shows columns from right to left. /// /// ///Default value for this property is false. /// public bool ShowColumnsFromRightToLeft { get { return this.GetWindowOption(WorksheetWindowOptions.ColumnsFromRightToLeft); } set { this.SetWindowOption(value, WorksheetWindowOptions.ColumnsFromRightToLeft); } } /// ///If true, MS Excel shows formulas. Otherwise, formula results are shown. /// /// ///Default value for this property is false. /// public bool ShowFormulas { get { return this.GetWindowOption(WorksheetWindowOptions.ShowFormulas); } set { this.SetWindowOption(value, WorksheetWindowOptions.ShowFormulas); } } /// ///If true, MS Excel shows grid lines. /// /// ///Default value for this property is true. /// public bool ShowGridLines { get { return this.GetWindowOption(WorksheetWindowOptions.ShowGridLines); } set { this.SetWindowOption(value, WorksheetWindowOptions.ShowGridLines); } } /// ///If true, MS Excel shows worksheet in page break preview. Otherwise, normal view is used. /// /// ///Default value for this property is false. /// public bool ShowInPageBreakPreview { get { return this.GetWindowOption(WorksheetWindowOptions.ShowInPageBreakPreview); } set { this.SetWindowOption(value, WorksheetWindowOptions.ShowInPageBreakPreview); } } /// ///If true, MS Excel shows outline symbols. /// /// ///Default value for this property is true. /// public bool ShowOutlineSymbols { get { return this.GetWindowOption(WorksheetWindowOptions.ShowOutlineSymbols); } set { this.SetWindowOption(value, WorksheetWindowOptions.ShowOutlineSymbols); } } /// ///If true, MS Excel shows row and column headers. /// /// ///Default value for this property is true. /// public bool ShowSheetHeaders { get { return this.GetWindowOption(WorksheetWindowOptions.ShowSheetHeaders); } set { this.SetWindowOption(value, WorksheetWindowOptions.ShowSheetHeaders); } } /// ///If true, MS Excel shows zero values. Otherwise, zero values are shown as empty cells. /// /// ///Default value for this property is true. /// public bool ShowZeroValues { get { return this.GetWindowOption(WorksheetWindowOptions.ShowZeroValues); } set { this.SetWindowOption(value, WorksheetWindowOptions.ShowZeroValues); } } /// ///Gets collection of all vertical page breaks ///(VerticalPageBreak) in the worksheet. /// public VerticalPageBreakCollection VerticalPageBreaks { get { return this.verticalPageBreaks; } } /// ///Magnification factor in normal view. /// /// ///

Unit is one percent. Value must be between 10 and 400.

///

Default value for this property is 100.

///
///Thrown if value is out of 10 to 400 range. public int Zoom { get { return this.zoom; } set { if ((value < 10) || (value > 400)) { throw new ArgumentOutOfRangeException("value", value, "Zoom must be in range from 10 to 400."); } this.zoom = value; } } // Fields private CellRange cells; private ExcelColumnCollection columns; private int defaultColumnWidth; private int firstVisibleColumn; private int firstVisibleRow; internal ushort fitWorksheetHeightToPages; internal ushort fitWorksheetWidthToPages; internal double footerMargin; internal double headerMargin; internal HorizontalPageBreakCollection horizontalPageBreaks; private MergedCellRanges mergedRanges; private string name; private NamedRangeCollection namedRanges; internal ushort numberOfCopies; private bool outlineColumnButtonsRight; private bool outlineRowButtonsBelow; private int pageBreakViewZoom; internal ushort paperSize; private ExcelWorksheetCollection parent; internal PreservedRecords PreservedWorksheetRecords; internal ushort printResolution; private bool protectedWorksheet; private ExcelRowCollection rows; internal int scalingFactor; internal SetupOptions setupOptions; internal ushort startPageNumber; private VerticalPageBreakCollection verticalPageBreaks; internal ushort verticalPrintResolution; internal WorksheetWindowOptions windowOptions; private int zoom; } }