public void TestMapInfoExists() { XSSFWorkbook wb = XSSFTestDataSamples.OpenSampleWorkbook("CustomXMLMappings.xlsx"); MapInfo mapInfo = null; SingleXmlCells SingleXMLCells = null; foreach (POIXMLDocumentPart p in wb.GetRelations()) { if (p is MapInfo) { mapInfo = (MapInfo)p; CT_MapInfo ctMapInfo = mapInfo.GetCTMapInfo(); Assert.IsNotNull(ctMapInfo); Assert.AreEqual(1, ctMapInfo.Schema.Count); foreach (XSSFMap map in mapInfo.GetAllXSSFMaps()) { string xmlSchema = map.GetSchema(); Assert.IsNotNull(xmlSchema); } } } XSSFSheet sheet1 = (XSSFSheet)wb.GetSheetAt(0); foreach (POIXMLDocumentPart p in sheet1.GetRelations()) { if (p is SingleXmlCells) { SingleXMLCells = (SingleXmlCells)p; } } Assert.IsNotNull(mapInfo); Assert.IsNotNull(SingleXMLCells); }
public XSSFSingleXmlCell(CT_SingleXmlCell SingleXmlCell, SingleXmlCells parent) { this.SingleXmlCell = SingleXmlCell; this.parent = parent; }