internal ExcelWorksheet(string name, ExcelWorksheetCollection parent) { this.defaultColumnWidth = 2340; this.pageBreakViewZoom = 60; this.zoom = 100; this.windowOptions = WorksheetWindowOptions.DefaultGridLineColor | WorksheetWindowOptions.ShowGridLines | WorksheetWindowOptions.ShowOutlineSymbols | WorksheetWindowOptions.ShowSheetHeaders | WorksheetWindowOptions.ShowZeroValues; this.paperSize = 0; this.scalingFactor = 100; this.startPageNumber = 1; this.fitWorksheetWidthToPages = 0; this.fitWorksheetHeightToPages = 0; this.setupOptions = SetupOptions.Portrait; this.printResolution = 0; this.verticalPrintResolution = 0; this.headerMargin = 0.5; this.footerMargin = 0.5; this.numberOfCopies = 1; this.WSBoolOpt = WSBoolOptions.ColGroupRight | WSBoolOptions.RowGroupBelow | WSBoolOptions.ShowAutoBreaks | WSBoolOptions.ShowColumnOutline | WSBoolOptions.ShowRowOutline; 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(); this.pictures = new ExcelPictureCollection(this); this.shapes = new ExcelShapeCollection(this); this.printOptions = new ExcelPrintOptions(this); this.viewOptions = new ExcelViewOptions(this); }
internal ExcelWorksheet(string name, ExcelWorksheetCollection parent, ExcelWorksheet sourceWorksheet) { this.defaultColumnWidth = 2340; this.pageBreakViewZoom = 60; this.zoom = 100; this.windowOptions = WorksheetWindowOptions.DefaultGridLineColor | WorksheetWindowOptions.ShowGridLines | WorksheetWindowOptions.ShowOutlineSymbols | WorksheetWindowOptions.ShowSheetHeaders | WorksheetWindowOptions.ShowZeroValues; this.paperSize = 0; this.scalingFactor = 100; this.startPageNumber = 1; this.fitWorksheetWidthToPages = 0; this.fitWorksheetHeightToPages = 0; this.setupOptions = SetupOptions.Portrait; this.printResolution = 0; this.verticalPrintResolution = 0; this.headerMargin = 0.5; this.footerMargin = 0.5; this.numberOfCopies = 1; this.WSBoolOpt = WSBoolOptions.ColGroupRight | WSBoolOptions.RowGroupBelow | WSBoolOptions.ShowAutoBreaks | WSBoolOptions.ShowColumnOutline | WSBoolOptions.ShowRowOutline; 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.WSBoolOpt = sourceWorksheet.WSBoolOpt; if (sourceWorksheet.PreservedWorksheetRecords != null) { this.PreservedWorksheetRecords = new PreservedRecords(sourceWorksheet.PreservedWorksheetRecords); } this.windowOptions = sourceWorksheet.windowOptions & ~(WorksheetWindowOptions.SheetSelected | WorksheetWindowOptions.SheetVisible); 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); this.pictures = new ExcelPictureCollection(this, sourceWorksheet.Pictures); this.shapes = new ExcelShapeCollection(this, sourceWorksheet.Shapes); this.printOptions = new ExcelPrintOptions(this); this.viewOptions = new ExcelViewOptions(this); }
private void Reset() { this.worksheets = new ExcelWorksheetCollection(this); this.cachedMsoDrawingGroupArguments = null; this.cellStyleCache = new CellStyleCachedCollection(QueueSizeFromAffectedCellsLimit(this.groupMethodsAffectedCellsLimit)); this.protectedMbr = false; this.summaryStream = null; this.documentSummaryStream = null; this.PreservedGlobalRecords = null; this.use1904DateSystem = false; }
public void InitializeByWorksheets(ExcelWorksheetCollection worksheets) { uint groupId = 0; foreach (ExcelWorksheet worksheet in worksheets) { this.shapesCount += worksheet.Shapes.ShapesCount; groupId++; this.drawingsCount++; this.AddCluster(groupId, worksheet.Shapes.ShapesCount); } }
public static byte[] ConvertNameRecordRangeToRpnBytes(ExcelWorksheet sheet, CellRange range, string sheetName, ExcelWorksheetCollection worksheets) { FormulaToken token = null; string str = string.Empty; if ((range.Width == 1) && (range.Height == 1)) { Match match = RefFormulaToken.IsCellRegex.Match(range.ToString()); string str2 = ConvertToAbsolute(match.Groups["Row"].Value); string str3 = ConvertToAbsolute(match.Groups["Column"].Value); str = sheetName + "!" + str3 + str2; token = new Ref3dFormulaToken(sheet, FormulaTokenCode.Ref3d1); } else { Match match2 = AreaFormulaToken.IsCellRangeRegex.Match(range.ToString()); string str4 = ConvertToAbsolute(match2.Groups["Row1"].Value); string str5 = ConvertToAbsolute(match2.Groups["Column1"].Value); string str6 = ConvertToAbsolute(match2.Groups["Row2"].Value); string str7 = ConvertToAbsolute(match2.Groups["Column2"].Value); str = sheetName + "!" + str5 + str4 + ":" + str7 + str6; token = new Area3dFormulaToken(FormulaTokenCode.Area3d1); } token.DelayInitialize(new object[] { str, worksheets }); return(token.ConvertToBytes()); }
public override void DelayInitialize(object[] data) { this.workbook = data[1] as ExcelWorksheetCollection; this.SetAred3dCell(data[0] as string); }
private void Initialize() { SpreadsheetInfo.ValidateLicense(this); this.worksheets = new ExcelWorksheetCollection(this); this.cellStyleCache = new CellStyleCachedCollection(QueueSizeFromAffectedCellsLimit(this.groupMethodsAffectedCellsLimit)); }
public override string ToString() { this.workbook = (this.workbook == null) ? this.excelSheet.Parent : this.workbook; return(this.workbook.SheetNames[this.ExternsheetIndex + 1] + "!" + base.ToString()); }