/// <summary> /// Provides access to all the office document properties. /// </summary> /// <param name="package"></param> /// <param name="ns"></param> internal OfficeProperties(ExcelPackage package, XmlNamespaceManager ns) : base(ns) { _package = package; _coreHelper = XmlHelperFactory.Create(ns, CorePropertiesXml.SelectSingleNode("cp:coreProperties", NameSpaceManager)); _extendedHelper = XmlHelperFactory.Create(ns, ExtendedPropertiesXml); _customHelper = XmlHelperFactory.Create(ns, CustomPropertiesXml); }
internal ExcelComment(XmlNamespaceManager ns, XmlNode commentTopNode, ExcelRangeBase cell) : base(null, cell, cell.Worksheet.VmlDrawings.NameSpaceManager) { _commentHelper = new XmlHelper(ns, commentTopNode); var textElem=commentTopNode.SelectSingleNode("d:text", ns); if (textElem == null) { textElem = commentTopNode.OwnerDocument.CreateElement("text", ExcelPackage.schemaMain); commentTopNode.AppendChild(textElem); } if (!cell.Worksheet.VmlDrawings.ContainsKey(ExcelAddress.GetCellID(cell.Worksheet.SheetID, cell.Start.Row, cell.Start.Column))) { cell.Worksheet.VmlDrawings.Add(cell); } TopNode = cell.Worksheet.VmlDrawings[ExcelCellBase.GetCellID(cell.Worksheet.SheetID, cell.Start.Row, cell.Start.Column)].TopNode; RichText = new ExcelRichTextCollection(ns,textElem); }
/// <summary> /// Provides access to all the office document properties. /// </summary> /// <param name="xlPackage"></param> public OfficeProperties(ExcelPackage xlPackage, XmlNamespaceManager ns) : base(ns) { _package = xlPackage; _coreHelper = new XmlHelper(ns, CorePropertiesXml.SelectSingleNode("cp:coreProperties", NameSpaceManager)); _extendedHelper = new XmlHelper(ns, ExtendedPropertiesXml); _customHelper = new XmlHelper(ns, CustomPropertiesXml); }