Ejemplo n.º 1
0
        public static CT_CalcPr Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_CalcPr ctObj = new CT_CalcPr();

            ctObj.calcId = XmlHelper.ReadUInt(node.Attributes["calcId"]);
            if (node.Attributes["calcMode"] != null)
            {
                ctObj.calcMode = (ST_CalcMode)Enum.Parse(typeof(ST_CalcMode), node.Attributes["calcMode"].Value);
            }
            ctObj.fullCalcOnLoad = XmlHelper.ReadBool(node.Attributes["fullCalcOnLoad"]);
            if (node.Attributes["refMode"] != null)
            {
                ctObj.refMode = (ST_RefMode)Enum.Parse(typeof(ST_RefMode), node.Attributes["refMode"].Value);
            }
            ctObj.iterate               = XmlHelper.ReadBool(node.Attributes["iterate"]);
            ctObj.iterateCount          = XmlHelper.ReadUInt(node.Attributes["iterateCount"]);
            ctObj.iterateDelta          = XmlHelper.ReadDouble(node.Attributes["iterateDelta"]);
            ctObj.fullPrecision         = XmlHelper.ReadBool(node.Attributes["fullPrecision"]);
            ctObj.calcCompleted         = XmlHelper.ReadBool(node.Attributes["calcCompleted"]);
            ctObj.calcOnSave            = XmlHelper.ReadBool(node.Attributes["calcOnSave"]);
            ctObj.concurrentCalc        = XmlHelper.ReadBool(node.Attributes["concurrentCalc"]);
            ctObj.concurrentManualCount = XmlHelper.ReadUInt(node.Attributes["concurrentManualCount"]);
            ctObj.forceFullCalc         = XmlHelper.ReadBool(node.Attributes["forceFullCalc"]);
            return(ctObj);
        }
Ejemplo n.º 2
0
 public static CT_CalcPr Parse(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     if (node == null)
         return null;
     CT_CalcPr ctObj = new CT_CalcPr();
     ctObj.calcId = XmlHelper.ReadUInt(node.Attributes["calcId"]);
     if (node.Attributes["calcMode"] != null)
         ctObj.calcMode = (ST_CalcMode)Enum.Parse(typeof(ST_CalcMode), node.Attributes["calcMode"].Value);
     ctObj.fullCalcOnLoad = XmlHelper.ReadBool(node.Attributes["fullCalcOnLoad"]);
     if (node.Attributes["refMode"] != null)
         ctObj.refMode = (ST_RefMode)Enum.Parse(typeof(ST_RefMode), node.Attributes["refMode"].Value);
     ctObj.iterate = XmlHelper.ReadBool(node.Attributes["iterate"]);
     ctObj.iterateCount = XmlHelper.ReadUInt(node.Attributes["iterateCount"]);
     ctObj.iterateDelta = XmlHelper.ReadDouble(node.Attributes["iterateDelta"]);
     ctObj.fullPrecision = XmlHelper.ReadBool(node.Attributes["fullPrecision"]);
     ctObj.calcCompleted = XmlHelper.ReadBool(node.Attributes["calcCompleted"]);
     ctObj.calcOnSave = XmlHelper.ReadBool(node.Attributes["calcOnSave"]);
     ctObj.concurrentCalc = XmlHelper.ReadBool(node.Attributes["concurrentCalc"]);
     ctObj.concurrentManualCount = XmlHelper.ReadUInt(node.Attributes["concurrentManualCount"]);
     ctObj.forceFullCalc = XmlHelper.ReadBool(node.Attributes["forceFullCalc"]);
     return ctObj;
 }
Ejemplo n.º 3
0
 public CT_CalcPr AddNewCalcPr()
 {
     this.calcPrField = new CT_CalcPr();
     return(this.calcPrField);
 }
Ejemplo n.º 4
0
        public static CT_Workbook Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Workbook ctObj = new CT_Workbook();

            ctObj.fileRecoveryPr = new List <CT_FileRecoveryPr>();
            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "fileVersion")
                {
                    ctObj.fileVersion = CT_FileVersion.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "fileSharing")
                {
                    ctObj.fileSharing = CT_FileSharing.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "workbookPr")
                {
                    ctObj.workbookPr = CT_WorkbookPr.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "workbookProtection")
                {
                    ctObj.workbookProtection = CT_WorkbookProtection.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "bookViews")
                {
                    ctObj.bookViews = CT_BookViews.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "sheets")
                {
                    ctObj.sheets = CT_Sheets.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "functionGroups")
                {
                    ctObj.functionGroups = CT_FunctionGroups.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "externalReferences")
                {
                    ctObj.externalReferences = CT_ExternalReferences.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "definedNames")
                {
                    ctObj.definedNames = CT_DefinedNames.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "calcPr")
                {
                    ctObj.calcPr = CT_CalcPr.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "oleSize")
                {
                    ctObj.oleSize = CT_OleSize.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "customWorkbookViews")
                {
                    ctObj.customWorkbookViews = CT_CustomWorkbookViews.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "pivotCaches")
                {
                    ctObj.pivotCaches = CT_PivotCaches.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "smartTagPr")
                {
                    ctObj.smartTagPr = CT_SmartTagPr.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "smartTagTypes")
                {
                    ctObj.smartTagTypes = CT_SmartTagTypes.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "webPublishing")
                {
                    ctObj.webPublishing = CT_WebPublishing.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "webPublishObjects")
                {
                    ctObj.webPublishObjects = CT_WebPublishObjects.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "extLst")
                {
                    ctObj.extLst = CT_ExtensionList.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "fileRecoveryPr")
                {
                    ctObj.fileRecoveryPr.Add(CT_FileRecoveryPr.Parse(childNode, namespaceManager));
                }
            }
            return(ctObj);
        }
Ejemplo n.º 5
0
 public CT_CalcPr AddNewCalcPr()
 {
     this.calcPrField = new CT_CalcPr();
     return this.calcPrField;
 }