Beispiel #1
0
        public static CT_Stylesheet Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Stylesheet ctObj = new CT_Stylesheet();

            foreach (XElement childNode in node.ChildElements())
            {
                if (childNode.Name.LocalName == "numFmts")
                {
                    ctObj.numFmts = CT_NumFmts.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "fonts")
                {
                    ctObj.fonts = CT_Fonts.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "fills")
                {
                    ctObj.fills = CT_Fills.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "borders")
                {
                    ctObj.borders = CT_Borders.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "cellStyleXfs")
                {
                    ctObj.cellStyleXfs = CT_CellStyleXfs.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "cellXfs")
                {
                    ctObj.cellXfs = CT_CellXfs.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "cellStyles")
                {
                    ctObj.cellStyles = CT_CellStyles.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "dxfs")
                {
                    ctObj.dxfs = CT_Dxfs.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "tableStyles")
                {
                    ctObj.tableStyles = CT_TableStyles.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "colors")
                {
                    ctObj.colors = CT_Colors.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "extLst")
                {
                    ctObj.extLst = CT_ExtensionList.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }
Beispiel #2
0
        public static CT_CellStyleXfs Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_CellStyleXfs ctObj = new CT_CellStyleXfs();

            ctObj.count = XmlHelper.ReadUInt(node.Attribute("count"));
            ctObj.xf    = new List <CT_Xf>();
            foreach (XElement childNode in node.ChildElements())
            {
                if (childNode.Name.LocalName == "xf")
                {
                    ctObj.xf.Add(CT_Xf.Parse(childNode, namespaceManager));
                }
            }
            return(ctObj);
        }
Beispiel #3
0
 public CT_CellStyleXfs AddNewCellStyleXfs()
 {
     this.cellStyleXfsField = new CT_CellStyleXfs();
     return(this.cellStyleXfsField);
 }