protected void ReadFrom(Stream is1) { try { //XmlOptions options = new XmlOptions(DEFAULT_XML_OPTIONS); ////Removing root element //options.LoadReplaceDocumentElement = (/*setter*/null); XmlDocument xmlDoc = ConvertStreamToXml(is1); ctPivotCache = CT_PivotCache.Parse(xmlDoc.DocumentElement, NamespaceManager); } catch (XmlException e) { throw new IOException(e.Message); } }
public void AddPivotCache() { XSSFWorkbook wb = new XSSFWorkbook(); try { CT_Workbook ctWb = wb.GetCTWorkbook(); CT_PivotCache pivotCache = wb.AddPivotCache("0"); //Ensures that pivotCaches is Initiated Assert.IsTrue(ctWb.IsSetPivotCaches()); Assert.AreSame(pivotCache, ctWb.pivotCaches.GetPivotCacheArray(0)); Assert.AreEqual("0", pivotCache.id); } finally { wb.Close(); } }
public XSSFPivotCache(CT_PivotCache ctPivotCache) : base() { this.ctPivotCache = ctPivotCache; }
public XSSFPivotCache() : base() { ctPivotCache = new CT_PivotCache(); }