Example #1
0
 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")
             [email protected] = CT_Rst.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "extLst")
             ctObj.extLst = CT_ExtensionList.Parse(childNode, namespaceManager);
     }
     return ctObj;
 }
Example #2
0
 /**
  * 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();
 }
Example #3
0
 //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;
 }
Example #4
0
 /**
  * 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();
 }
Example #5
0
 /// <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);
 }
Example #6
0
 public void SetCArray(CT_Cell[] array)
 {
     cField = new List<CT_Cell>(array);
 }
Example #7
0
 public CT_Cell AddNewC()
 {
     if (null == cField) { cField = new List<CT_Cell>(); }
     CT_Cell cell = new CT_Cell();
     this.cField.Add(cell);
     return cell;
 }
Example #8
0
 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;
 }