Esempio n. 1
0
        public static CT_CustomWorkbookView Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_CustomWorkbookView ctObj = new CT_CustomWorkbookView();

            ctObj.name                   = XmlHelper.ReadString(node.Attribute("name"));
            ctObj.guid                   = XmlHelper.ReadString(node.Attribute("guid"));
            ctObj.autoUpdate             = XmlHelper.ReadBool(node.Attribute("autoUpdate"));
            ctObj.mergeInterval          = XmlHelper.ReadUInt(node.Attribute("mergeInterval"));
            ctObj.mergeIntervalSpecified = node.Attribute("mergeInterval") != null;
            ctObj.changesSavedWin        = XmlHelper.ReadBool(node.Attribute("changesSavedWin"));
            ctObj.onlySync               = XmlHelper.ReadBool(node.Attribute("onlySync"));
            ctObj.personalView           = XmlHelper.ReadBool(node.Attribute("personalView"));
            ctObj.includePrintSettings   = XmlHelper.ReadBool(node.Attribute("includePrintSettings"));
            ctObj.includeHiddenRowCol    = XmlHelper.ReadBool(node.Attribute("includeHiddenRowCol"));
            ctObj.maximized              = XmlHelper.ReadBool(node.Attribute("maximized"));
            ctObj.minimized              = XmlHelper.ReadBool(node.Attribute("minimized"));
            ctObj.showHorizontalScroll   = XmlHelper.ReadBool(node.Attribute("showHorizontalScroll"));
            ctObj.showVerticalScroll     = XmlHelper.ReadBool(node.Attribute("showVerticalScroll"));
            ctObj.showSheetTabs          = XmlHelper.ReadBool(node.Attribute("showSheetTabs"));
            ctObj.xWindow                = XmlHelper.ReadInt(node.Attribute("xWindow"));
            ctObj.yWindow                = XmlHelper.ReadInt(node.Attribute("yWindow"));
            ctObj.windowWidth            = XmlHelper.ReadUInt(node.Attribute("windowWidth"));
            ctObj.windowHeight           = XmlHelper.ReadUInt(node.Attribute("windowHeight"));
            ctObj.tabRatio               = XmlHelper.ReadUInt(node.Attribute("tabRatio"));
            ctObj.activeSheetId          = XmlHelper.ReadUInt(node.Attribute("activeSheetId"));
            ctObj.showFormulaBar         = XmlHelper.ReadBool(node.Attribute("showFormulaBar"));
            ctObj.showStatusbar          = XmlHelper.ReadBool(node.Attribute("showStatusbar"));
            if (node.Attribute("showComments") != null)
            {
                ctObj.showComments = (ST_Comments)Enum.Parse(typeof(ST_Comments), node.Attribute("showComments").Value);
            }
            if (node.Attribute("showObjects") != null)
            {
                ctObj.showObjects = (ST_Objects)Enum.Parse(typeof(ST_Objects), node.Attribute("showObjects").Value);
            }
            foreach (XElement childNode in node.ChildElements())
            {
                if (childNode.Name.LocalName == "extLst")
                {
                    ctObj.extLst = CT_ExtensionList.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }
Esempio n. 2
0
        public static CT_CustomWorkbookViews Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_CustomWorkbookViews ctObj = new CT_CustomWorkbookViews();

            ctObj.customWorkbookView = new List <CT_CustomWorkbookView>();
            foreach (XElement childNode in node.ChildElements())
            {
                if (childNode.Name.LocalName == "customWorkbookView")
                {
                    ctObj.customWorkbookView.Add(CT_CustomWorkbookView.Parse(childNode, namespaceManager));
                }
            }
            return(ctObj);
        }