public XLWorkbook(XLEventTracking eventTracking) { EventTracking = eventTracking; DefaultRowHeight = 15; DefaultColumnWidth = 8.43; Style = new XLStyle(null, DefaultStyle); RowHeight = DefaultRowHeight; ColumnWidth = DefaultColumnWidth; PageOptions = DefaultPageOptions; Outline = DefaultOutline; Properties = new XLWorkbookProperties(); CalculateMode = XLCalculateMode.Default; ReferenceStyle = XLReferenceStyle.Default; InitializeTheme(); ShowFormulas = DefaultShowFormulas; ShowGridLines = DefaultShowGridLines; ShowOutlineSymbols = DefaultShowOutlineSymbols; ShowRowColHeaders = DefaultShowRowColHeaders; ShowRuler = DefaultShowRuler; ShowWhiteSpace = DefaultShowWhiteSpace; ShowZeros = DefaultShowZeros; RightToLeft = DefaultRightToLeft; WorksheetsInternal = new XLWorksheets(this); NamedRanges = new XLNamedRanges(this); CustomProperties = new XLCustomProperties(this); ShapeIdManager = new XLIdManager(); Author = Environment.UserName; }
public XLNamedRange(XLNamedRanges namedRanges, String rangeName, IXLRanges ranges, String comment = null) { Name = rangeName; ranges.ForEach(r => _rangeList.Add(r.RangeAddress.ToStringFixed(XLReferenceStyle.A1, true))); Comment = comment; _namedRanges = namedRanges; }
public XLNamedRange(XLNamedRanges namedRanges , String rangeName, String range, String comment = null) { Name = rangeName; _rangeList.Add(range); Comment = comment; _namedRanges = namedRanges; }
private XLNamedRange(XLNamedRanges namedRanges, String rangeName, String comment) { _namedRanges = namedRanges ?? throw new ArgumentNullException(nameof(namedRanges)); Visible = true; Name = rangeName; Comment = comment; }
public XLNamedRange(XLNamedRanges namedRanges, String rangeName, String range, String comment = null) { Name = rangeName; _rangeList.Add(range); Comment = comment; _namedRanges = namedRanges; }
public XLWorksheet(String sheetName, XLWorkbook workbook) : base(new XLRangeAddress( new XLAddress(null, XLHelper.MinRowNumber, XLHelper.MinColumnNumber, false, false), new XLAddress(null, XLHelper.MaxRowNumber, XLHelper.MaxColumnNumber, false, false))) { EventTrackingEnabled = workbook.EventTracking == XLEventTracking.Enabled; RangeShiftedRows = new XLReentrantEnumerableSet<XLCallbackAction>(); RangeShiftedColumns = new XLReentrantEnumerableSet<XLCallbackAction>(); RangeAddress.Worksheet = this; RangeAddress.FirstAddress.Worksheet = this; RangeAddress.LastAddress.Worksheet = this; NamedRanges = new XLNamedRanges(workbook); SheetView = new XLSheetView(); Tables = new XLTables(); Hyperlinks = new XLHyperlinks(); DataValidations = new XLDataValidations(); PivotTables = new XLPivotTables(); Protection = new XLSheetProtection(); AutoFilter = new XLAutoFilter(); ConditionalFormats = new XLConditionalFormats(); Workbook = workbook; SetStyle(workbook.Style); Internals = new XLWorksheetInternals(new XLCellsCollection(), new XLColumnsCollection(), new XLRowsCollection(), new XLRanges()); PageSetup = new XLPageSetup((XLPageSetup)workbook.PageOptions, this); Outline = new XLOutline(workbook.Outline); _columnWidth = workbook.ColumnWidth; _rowHeight = workbook.RowHeight; RowHeightChanged = Math.Abs(workbook.RowHeight - XLWorkbook.DefaultRowHeight) > XLHelper.Epsilon; Name = sheetName; SubscribeToShiftedRows((range, rowsShifted) => this.WorksheetRangeShiftedRows(range, rowsShifted)); SubscribeToShiftedColumns((range, columnsShifted) => this.WorksheetRangeShiftedColumns(range, columnsShifted)); Charts = new XLCharts(); ShowFormulas = workbook.ShowFormulas; ShowGridLines = workbook.ShowGridLines; ShowOutlineSymbols = workbook.ShowOutlineSymbols; ShowRowColHeaders = workbook.ShowRowColHeaders; ShowRuler = workbook.ShowRuler; ShowWhiteSpace = workbook.ShowWhiteSpace; ShowZeros = workbook.ShowZeros; RightToLeft = workbook.RightToLeft; TabColor = XLColor.NoColor; SelectedRanges = new XLRanges(); Author = workbook.Author; Pictures = new XLPictures(); }
internal XLNamedRange(XLNamedRanges namedRanges, String rangeName, Boolean validateName, String comment) { _namedRanges = namedRanges ?? throw new ArgumentNullException(nameof(namedRanges)); Visible = true; if (validateName) { Name = rangeName; } else { SetNameWithoutValidation(rangeName); } Comment = comment; }
internal XLNamedRange(XLNamedRanges namedRanges, String rangeName, Boolean validateName, String range, String comment) : this(namedRanges, rangeName, validateName, comment) { //TODO range.Split(',') may produce incorrect result if a worksheet name contains comma. Refactoring needed. range.Split(',').ForEach(r => RangeList.Add(r)); }
public XLNamedRange(XLNamedRanges namedRanges, String rangeName, IXLRanges ranges, String comment = null) : this(namedRanges, rangeName, validateName : true, comment) { ranges.ForEach(r => RangeList.Add(r.RangeAddress.ToStringFixed(XLReferenceStyle.A1, true))); }
public XLNamedRange(XLNamedRanges namedRanges, String rangeName, String range, String comment = null) : this(namedRanges, rangeName, validateName : true, range, comment) { }
public XLNamedRange(XLNamedRanges namedRanges, String rangeName, String range, String comment = null) : this(namedRanges, rangeName, comment) { RangeList.Add(range); }