public static CT_Cell Parse(XmlNode node, XmlNamespaceManager namespaceManager) { if (node == null) return null; CT_Cell ctObj = new CT_Cell(); ctObj.r = XmlHelper.ReadString(node.Attributes["r"]); ctObj.s = XmlHelper.ReadUInt(node.Attributes["s"]); if (node.Attributes["t"] != null) ctObj.t = (ST_CellType)Enum.Parse(typeof(ST_CellType), node.Attributes["t"].Value); ctObj.cm = XmlHelper.ReadUInt(node.Attributes["cm"]); ctObj.vm = XmlHelper.ReadUInt(node.Attributes["vm"]); ctObj.ph = XmlHelper.ReadBool(node.Attributes["ph"]); foreach (XmlNode childNode in node.ChildNodes) { if (childNode.LocalName == "f") ctObj.f = CT_CellFormula.Parse(childNode, namespaceManager); else if (childNode.LocalName == "v") ctObj.v = childNode.InnerText; else if (childNode.LocalName == "is") ctObj.@is = CT_Rst.Parse(childNode, namespaceManager); else if (childNode.LocalName == "extLst") ctObj.extLst = CT_ExtensionList.Parse(childNode, namespaceManager); } return ctObj; }
public CT_Cell AddNewC() { if (null == cField) { cField = new List <CT_Cell>(); } CT_Cell cell = new CT_Cell(); this.cField.Add(cell); return(cell); }
/** * Construct a XSSFCell. * * @param row the parent row. * @param cell the xml bean Containing information about the cell. */ public XSSFCell(XSSFRow row, CT_Cell cell) { _cell = cell; _row = row; if (cell.r != null) { _cellNum = new CellReference(cell.r).Col; } _sharedStringSource = ((XSSFWorkbook)row.Sheet.Workbook).GetSharedStringSource(); _stylesSource = ((XSSFWorkbook)row.Sheet.Workbook).GetStylesSource(); }
//public CT_Cell() //{ // this.extLstField = new CT_ExtensionList(); // //this.isField = new CT_Rst(); // //this.fField = new CT_CellFormula(); // this.sField = (uint)(0); // this.tField = ST_CellType.n; // this.cmField = ((uint)(0)); // this.vmField = ((uint)(0)); // this.phField = false; //} public void Set(CT_Cell cell) { fField = cell.fField; vField = cell.vField; isField = cell.isField; extLstField = cell.extLstField; rField = cell.rField; sField = cell.sField; tField = cell.tField; cmField = cell.cmField; vmField = cell.vmField; phField = cell.phField; }
/** * Construct a XSSFCell. * * @param row the parent row. * @param cell the xml bean Containing information about the cell. */ public XSSFCell(XSSFRow row, CT_Cell cell) { _cell = cell; _row = row; if (cell.r != null) { _cellNum = new CellReference(cell.r).Col; } else { int prevNum = row.LastCellNum; if (prevNum != -1) { _cellNum = (row as XSSFRow).GetCell(prevNum - 1, MissingCellPolicy.RETURN_NULL_AND_BLANK).ColumnIndex + 1; } } _sharedStringSource = ((XSSFWorkbook)row.Sheet.Workbook).GetSharedStringSource(); _stylesSource = ((XSSFWorkbook)row.Sheet.Workbook).GetStylesSource(); }
private double dyDescentField; //x14ac:dyDescent public static CT_Row Parse(XmlNode node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_Row ctObj = new CT_Row(); ctObj.r = XmlHelper.ReadUInt(node.Attributes["r"]); ctObj.spans = XmlHelper.ReadString(node.Attributes["spans"]); ctObj.s = XmlHelper.ReadUInt(node.Attributes["s"]); ctObj.customFormat = XmlHelper.ReadBool(node.Attributes["customFormat"]); ctObj.dyDescentField = XmlHelper.ReadDouble(node.Attributes["x14ac:dyDescent"]); if (node.Attributes["ht"] != null) { ctObj.ht = XmlHelper.ReadDouble(node.Attributes["ht"]); } ctObj.hidden = XmlHelper.ReadBool(node.Attributes["hidden"]); ctObj.outlineLevel = XmlHelper.ReadByte(node.Attributes["outlineLevel"]); ctObj.customHeight = XmlHelper.ReadBool(node.Attributes["customHeight"]); ctObj.collapsed = XmlHelper.ReadBool(node.Attributes["collapsed"]); ctObj.thickTop = XmlHelper.ReadBool(node.Attributes["thickTop"]); ctObj.thickBot = XmlHelper.ReadBool(node.Attributes["thickBot"]); ctObj.ph = XmlHelper.ReadBool(node.Attributes["ph"]); ctObj.c = new List <CT_Cell>(); foreach (XmlNode childNode in node.ChildNodes) { if (childNode.LocalName == "extLst") { ctObj.extLst = CT_ExtensionList.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "c") { ctObj.c.Add(CT_Cell.Parse(childNode, namespaceManager)); } } return(ctObj); }
public static CT_Cell Parse(XmlNode node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_Cell ctObj = new CT_Cell(); ctObj.r = XmlHelper.ReadString(node.Attributes["r"]); ctObj.s = XmlHelper.ReadUInt(node.Attributes["s"]); if (node.Attributes["t"] != null) { ctObj.t = (ST_CellType)Enum.Parse(typeof(ST_CellType), node.Attributes["t"].Value); } ctObj.cm = XmlHelper.ReadUInt(node.Attributes["cm"]); ctObj.vm = XmlHelper.ReadUInt(node.Attributes["vm"]); ctObj.ph = XmlHelper.ReadBool(node.Attributes["ph"]); foreach (XmlNode childNode in node.ChildNodes) { if (childNode.LocalName == "f") { ctObj.f = CT_CellFormula.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "v") { ctObj.v = childNode.InnerText; } else if (childNode.LocalName == "is") { ctObj.@is = CT_Rst.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "extLst") { ctObj.extLst = CT_ExtensionList.Parse(childNode, namespaceManager); } } return(ctObj); }
/// <summary> /// Blanks this cell. Blank cells have no formula or value but may have styling. /// This method erases all the data previously associated with this cell. /// </summary> private void SetBlank() { CT_Cell blank = new CT_Cell(); blank.r = (_cell.r); if (_cell.IsSetS()) blank.s=(_cell.s); _cell.Set(blank); }
public void SetCArray(CT_Cell[] array) { cField = new List<CT_Cell>(array); }
public CT_Cell AddNewC() { if (null == cField) { cField = new List<CT_Cell>(); } CT_Cell cell = new CT_Cell(); this.cField.Add(cell); return cell; }
public CT_RevisionCellChange() { this.extLstField = new CT_ExtensionList(); this.ndxfField = new CT_Dxf(); this.odxfField = new CT_Dxf(); this.ncField = new CT_Cell(); this.ocField = new CT_Cell(); this.uaField = false; this.raField = false; this.odxf1Field = false; this.xfDxfField = false; this.sField = false; this.dxfField = false; this.quotePrefixField = false; this.oldQuotePrefixField = false; this.phField = false; this.oldPhField = false; this.endOfListFormulaUpdateField = false; }