Beispiel #1
0
        internal void ReadPivotTable(TOpenXmlReader DataStream, TXlsxPivotCacheList PivotCacheList)
        {
            /* Fields that need updating:
             * location
             * filter
             */
            LoadAtts(DataStream, false);
            long cid = DataStream.GetAttributeAsLong("cacheId", -1);

            if (cid >= 0)
            {
                FCache = PivotCacheList.FindCacheFromDisk(cid);
            }

            if (DataStream.IsSimpleTag)
            {
                DataStream.NextTag(); return;
            }
            string StartElement = DataStream.RecordName();

            if (!DataStream.NextTag())
            {
                return;
            }

            while (!DataStream.AtEndElement(StartElement))
            {
                switch (DataStream.RecordName())
                {
                case "location":
                    ReadLocation(DataStream);
                    break;

                case "pivotFields":
                case "rowFields":
                case "rowItems":
                case "colFields":
                case "colItems":
                case "pageFields":
                case "dataFields":
                case "formats":
                case "conditionalFormats":
                case "chartFormats":
                case "pivotHierarchies":
                case "pivotTableStyleInfo":
                case "filters":
                case "rowHierarchiesUsage":
                case "colHierarchiesUsage":
                case "extLst":
                default:
                    FRecords.Add(new TXlsxPivotTableRecord(DataStream.GetXml()));
                    break;
                }
            }
        }
Beispiel #2
0
        internal TCopiedGen DrawingGen; //used when copying to make sure we don't repeat.
        #endregion

        #region Constructor
        internal TWorkbookGlobals(ExcelFile aWorkbook)
        {
            FWorkbook = aWorkbook;

            FFileEncryption = new TFileEncryption();
            FLel            = new TMiscRecordList();
            FBoundSheets    = new TBoundSheetList();
            FFnGroups       = new TMiscRecordList();

            FWorkbookProtection = new TWorkbookProtection();
            FFonts       = new TFontRecordList();
            FFormats     = TFormatRecordList.Create();
            FStyleXF     = new TXFRecordList();
            FCellXF      = new TXFRecordList();
            FDXF         = new TDXFRecordList();
            FStyles      = new TStyleRecordList();
            FTableStyles = new TTableStyleRecordList();

            FPivotCache = new TMiscRecordList();
#if (FRAMEWORK30 && !COMPACTFRAMEWORK)
            FXlsxPivotCache  = new TXlsxPivotCacheList();
            FXlsxConnections = null;
#endif
            FDocRoute  = new TMiscRecordList();
            FUserBView = new TMiscRecordList();

            FMetaData     = new TMiscRecordList();
            FNames        = new TNameRecordList();
            FRealTimeData = new TMiscRecordList();

            FReferences = new TReferences();

            FHeaderImages = new TDrawingGroup(xlr.HEADERIMG, 14);
            FDrawingGroup = new TDrawingGroup(xlr.MSODRAWINGGROUP, 0);

            FSST    = new TSST();
            FWebPub = new TMiscRecordList();

            FFeatHdr = new TMiscRecordList();
            FDConn   = new TMiscRecordList();

            FBorders            = new TBorderList();
            FPatterns           = new TPatternList();
            FFutureRecords      = new TMiscRecordList();
            StylesFutureStorage = null;

            CalcOptions = new TCalcOptions();
            ThemeRecord = new TThemeRecord();

#if (FRAMEWORK30 && !COMPACTFRAMEWORK)
            CustomXMLData = new TCustomXMLDataStorageList();
#endif
        }