Example #1
0
 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);
 }
Example #2
0
 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;
 }
Example #3
0
        public void CopyRecords(PreservedRecords source, int recordCode)
        {
            ArrayList list = (ArrayList)source.typeGroupedRecords[recordCode];

            if (list != null)
            {
                foreach (XLSRecord record in list)
                {
                    this.Add(record, recordCode);
                }
            }
        }
Example #4
0
        internal void CopyDrawings(ExcelFile source)
        {
            PreservedRecords preservedGlobalRecords = source.PreservedGlobalRecords;

            if (preservedGlobalRecords != null)
            {
                if (this.PreservedGlobalRecords == null)
                {
                    this.PreservedGlobalRecords = new PreservedRecords();
                }
                this.PreservedGlobalRecords.CopyRecords(preservedGlobalRecords, "MSODRAWINGGROUP");
            }
        }
Example #5
0
        public void CopyRecords(PreservedRecords source, string recordName)
        {
            int code = XLSDescriptors.GetByName(recordName).Code;

            this.CopyRecords(source, code);
        }
Example #6
0
 internal PreservedRecords(PreservedRecords source)
 {
     this.typeGroupedRecords = new Hashtable();
     this.typeGroupedRecords = (Hashtable)source.typeGroupedRecords.Clone();
 }