public static CT_TableColumn Parse(XmlNode node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_TableColumn ctObj = new CT_TableColumn(); if (node.Attributes["id"] != null) { ctObj.id = XmlHelper.ReadUInt(node.Attributes["id"]); } ctObj.uniqueName = XmlHelper.ReadString(node.Attributes["uniqueName"]); ctObj.name = XmlHelper.ReadString(node.Attributes["name"]); if (node.Attributes["totalsRowFunction"] != null) { ctObj.totalsRowFunction = (ST_TotalsRowFunction)Enum.Parse(typeof(ST_TotalsRowFunction), node.Attributes["totalsRowFunction"].Value); } ctObj.totalsRowLabel = XmlHelper.ReadString(node.Attributes["totalsRowLabel"]); if (node.Attributes["queryTableFieldId"] != null) { ctObj.queryTableFieldId = XmlHelper.ReadUInt(node.Attributes["queryTableFieldId"]); } if (node.Attributes["headerRowDxfId"] != null) { ctObj.headerRowDxfId = XmlHelper.ReadUInt(node.Attributes["headerRowDxfId"]); } if (node.Attributes["dataDxfId"] != null) { ctObj.dataDxfId = XmlHelper.ReadUInt(node.Attributes["dataDxfId"]); } if (node.Attributes["totalsRowDxfId"] != null) { ctObj.totalsRowDxfId = XmlHelper.ReadUInt(node.Attributes["totalsRowDxfId"]); } ctObj.headerRowCellStyle = XmlHelper.ReadString(node.Attributes["headerRowCellStyle"]); ctObj.dataCellStyle = XmlHelper.ReadString(node.Attributes["dataCellStyle"]); ctObj.totalsRowCellStyle = XmlHelper.ReadString(node.Attributes["totalsRowCellStyle"]); foreach (XmlNode childNode in node.ChildNodes) { if (childNode.LocalName == "calculatedColumnFormula") { ctObj.calculatedColumnFormula = CT_TableFormula.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "totalsRowFormula") { ctObj.totalsRowFormula = CT_TableFormula.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "xmlColumnPr") { ctObj.xmlColumnPr = CT_XmlColumnPr.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "extLst") { ctObj.extLst = CT_ExtensionList.Parse(childNode, namespaceManager); } } return(ctObj); }
public static CT_TableFormula Parse(XmlNode node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_TableFormula ctObj = new CT_TableFormula(); if (node.Attributes["array"] != null) { ctObj.array = XmlHelper.ReadBool(node.Attributes["array"]); } ctObj.Value = node.InnerText; return(ctObj); }
public static CT_TableFormula Parse(XmlNode node, XmlNamespaceManager namespaceManager) { if (node == null) return null; CT_TableFormula ctObj = new CT_TableFormula(); if (node.Attributes["array"] != null) ctObj.array = XmlHelper.ReadBool(node.Attributes["array"]); ctObj.Value = node.InnerText; return ctObj; }