diff --git a/ClosedXML/Excel/IXLWorkbook.cs b/ClosedXML/Excel/IXLWorkbook.cs index e87104b..702c490 100644 --- a/ClosedXML/Excel/IXLWorkbook.cs +++ b/ClosedXML/Excel/IXLWorkbook.cs @@ -8,55 +8,7 @@ { public interface IXLWorkbook : IDisposable { - /// - /// Gets an object to manipulate the worksheets. - /// - IXLWorksheets Worksheets { get; } - - /// - /// Gets an object to manipulate this workbook's named ranges. - /// - IXLNamedRanges NamedRanges { get; } - - /// - /// Gets an object to manipulate this workbook's theme. - /// - IXLTheme Theme { get; } - - /// - /// Gets or sets the default style for the workbook. - /// All new worksheets will use this style. - /// - IXLStyle Style { get; set; } - - /// - /// Gets or sets the default row height for the workbook. - /// All new worksheets will use this row height. - /// - Double RowHeight { get; set; } - - /// - /// Gets or sets the default column width for the workbook. - /// All new worksheets will use this column width. - /// - Double ColumnWidth { get; set; } - - /// - /// Gets or sets the default page options for the workbook. - /// All new worksheets will use these page options. - /// - IXLPageSetup PageOptions { get; set; } - - /// - /// Gets or sets the default outline options for the workbook. - /// All new worksheets will use these outline options. - /// - IXLOutline Outline { get; set; } - - /// - /// Gets or sets the workbook's properties. - /// - XLWorkbookProperties Properties { get; set; } + String Author { get; set; } /// /// Gets or sets the workbook's calculation mode. @@ -64,25 +16,16 @@ XLCalculateMode CalculateMode { get; set; } Boolean CalculationOnSave { get; set; } - Boolean ForceFullCalculation { get; set; } - Boolean FullCalculationOnLoad { get; set; } - Boolean FullPrecision { get; set; } /// - /// Gets or sets the workbook's reference style. + /// Gets or sets the default column width for the workbook. + /// All new worksheets will use this column width. /// - XLReferenceStyle ReferenceStyle { get; set; } + Double ColumnWidth { get; set; } IXLCustomProperties CustomProperties { get; } - Boolean ShowFormulas { get; set; } - Boolean ShowGridLines { get; set; } - Boolean ShowOutlineSymbols { get; set; } - Boolean ShowRowColHeaders { get; set; } - Boolean ShowRuler { get; set; } - Boolean ShowWhiteSpace { get; set; } - Boolean ShowZeros { get; set; } - Boolean RightToLeft { get; set; } + Boolean DefaultRightToLeft { get; } Boolean DefaultShowFormulas { get; } @@ -98,14 +41,129 @@ Boolean DefaultShowZeros { get; } - Boolean DefaultRightToLeft { get; } + Boolean ForceFullCalculation { get; set; } + + Boolean FullCalculationOnLoad { get; set; } + + Boolean FullPrecision { get; set; } + + Boolean IsPasswordProtected { get; } + + Boolean LockStructure { get; set; } + + Boolean LockWindows { get; set; } + + /// + /// Gets an object to manipulate this workbook's named ranges. + /// + IXLNamedRanges NamedRanges { get; } + + /// + /// Gets or sets the default outline options for the workbook. + /// All new worksheets will use these outline options. + /// + IXLOutline Outline { get; set; } + + /// + /// Gets or sets the default page options for the workbook. + /// All new worksheets will use these page options. + /// + IXLPageSetup PageOptions { get; set; } + + /// + /// Gets or sets the workbook's properties. + /// + XLWorkbookProperties Properties { get; set; } + + /// + /// Gets or sets the workbook's reference style. + /// + XLReferenceStyle ReferenceStyle { get; set; } + + Boolean RightToLeft { get; set; } + + /// + /// Gets or sets the default row height for the workbook. + /// All new worksheets will use this row height. + /// + Double RowHeight { get; set; } + + Boolean ShowFormulas { get; set; } + + Boolean ShowGridLines { get; set; } + + Boolean ShowOutlineSymbols { get; set; } + + Boolean ShowRowColHeaders { get; set; } + + Boolean ShowRuler { get; set; } + + Boolean ShowWhiteSpace { get; set; } + + Boolean ShowZeros { get; set; } + + /// + /// Gets or sets the default style for the workbook. + /// All new worksheets will use this style. + /// + IXLStyle Style { get; set; } + + /// + /// Gets an object to manipulate this workbook's theme. + /// + IXLTheme Theme { get; } + + Boolean Use1904DateSystem { get; set; } + + /// + /// Gets an object to manipulate the worksheets. + /// + IXLWorksheets Worksheets { get; } + + IXLWorksheet AddWorksheet(String sheetName); + + IXLWorksheet AddWorksheet(String sheetName, Int32 position); + + IXLWorksheet AddWorksheet(DataTable dataTable); + + void AddWorksheet(DataSet dataSet); + + void AddWorksheet(IXLWorksheet worksheet); + + IXLWorksheet AddWorksheet(DataTable dataTable, String sheetName); + + IXLCell Cell(String namedCell); + + IXLCells Cells(String namedCells); + + IXLCustomProperty CustomProperty(String name); + + Object Evaluate(String expression); + + IXLCells FindCells(Func predicate); + + IXLColumns FindColumns(Func predicate); + + IXLRows FindRows(Func predicate); IXLNamedRange NamedRange(String rangeName); - Boolean TryGetWorksheet(String name, out IXLWorksheet worksheet); + void Protect(Boolean lockStructure, Boolean lockWindows, String workbookPassword); + + void Protect(); + + void Protect(string workbookPassword); + + void Protect(Boolean lockStructure); + + void Protect(Boolean lockStructure, Boolean lockWindows); + + IXLRange Range(String range); IXLRange RangeFromFullAddress(String rangeAddress, out IXLWorksheet ws); + IXLRanges Ranges(String ranges); + /// /// Saves the current workbook. /// @@ -142,18 +200,6 @@ void SaveAs(Stream stream, SaveOptions options); - IXLWorksheet Worksheet(String name); - - IXLWorksheet Worksheet(Int32 position); - - IXLCustomProperty CustomProperty(String name); - - IXLCells FindCells(Func predicate); - - IXLRows FindRows(Func predicate); - - IXLColumns FindColumns(Func predicate); - /// /// Searches the cells' contents for a given piece of text /// @@ -163,58 +209,22 @@ /// IEnumerable Search(String searchText, CompareOptions compareOptions = CompareOptions.Ordinal, Boolean searchFormulae = false); - IXLCell Cell(String namedCell); + XLWorkbook SetLockStructure(Boolean value); - IXLCells Cells(String namedCells); - - IXLRange Range(String range); - - IXLRanges Ranges(String ranges); - - Boolean Use1904DateSystem { get; set; } + XLWorkbook SetLockWindows(Boolean value); XLWorkbook SetUse1904DateSystem(); XLWorkbook SetUse1904DateSystem(Boolean value); - IXLWorksheet AddWorksheet(String sheetName); - - IXLWorksheet AddWorksheet(String sheetName, Int32 position); - - IXLWorksheet AddWorksheet(DataTable dataTable); - - void AddWorksheet(DataSet dataSet); - - void AddWorksheet(IXLWorksheet worksheet); - - IXLWorksheet AddWorksheet(DataTable dataTable, String sheetName); - - Object Evaluate(String expression); - - String Author { get; set; } - - Boolean LockStructure { get; set; } - - XLWorkbook SetLockStructure(Boolean value); - - Boolean LockWindows { get; set; } - - XLWorkbook SetLockWindows(Boolean value); - - Boolean IsPasswordProtected { get; } - - void Protect(Boolean lockStructure, Boolean lockWindows, String workbookPassword); - - void Protect(); - - void Protect(string workbookPassword); - - void Protect(Boolean lockStructure); - - void Protect(Boolean lockStructure, Boolean lockWindows); + Boolean TryGetWorksheet(String name, out IXLWorksheet worksheet); void Unprotect(); void Unprotect(string workbookPassword); + + IXLWorksheet Worksheet(String name); + + IXLWorksheet Worksheet(Int32 position); } -} \ No newline at end of file +}