Exemple #1
0
        /**
         * @return the list of all Tables that provide a map rule to this mapping
         */
        public List <XSSFTable> GetRelatedTables()
        {
            List <XSSFTable> tables = new List <XSSFTable>();
            int sheetNumber         = mapInfo.Workbook.NumberOfSheets;

            foreach (ISheet sheet in mapInfo.Workbook)
            {
                foreach (RelationPart rp in ((XSSFSheet)sheet).RelationParts)
                {
                    if (rp.Relationship.RelationshipType.Equals(XSSFRelation.TABLE.Relation))
                    {
                        XSSFTable table = rp.DocumentPart as XSSFTable;
                        if (table.MapsTo(ctMap.ID))
                        {
                            tables.Add(table);
                        }
                    }
                }
            }
            return(tables);
        }
Exemple #2
0
        public List <XSSFTable> GetRelatedTables()
        {
            List <XSSFTable> xssfTableList = new List <XSSFTable>();
            int numberOfSheets             = this.mapInfo.Workbook.NumberOfSheets;

            for (int index = 0; index < numberOfSheets; ++index)
            {
                foreach (POIXMLDocumentPart relation in ((POIXMLDocumentPart)this.mapInfo.Workbook.GetSheetAt(index)).GetRelations())
                {
                    if (relation.GetPackageRelationship().RelationshipType.Equals(XSSFRelation.TABLE.Relation))
                    {
                        XSSFTable xssfTable = (XSSFTable)relation;
                        if (xssfTable.MapsTo((long)this.ctMap.ID))
                        {
                            xssfTableList.Add(xssfTable);
                        }
                    }
                }
            }
            return(xssfTableList);
        }
Exemple #3
0
        /**
         * @return the list of all Tables that provide a map rule to this mapping
         */
        public List <XSSFTable> GetRelatedTables()
        {
            List <XSSFTable> tables = new List <XSSFTable>();
            int sheetNumber         = mapInfo.Workbook.NumberOfSheets;

            for (int i = 0; i < sheetNumber; i++)
            {
                XSSFSheet sheet = (XSSFSheet)mapInfo.Workbook.GetSheetAt(i);
                foreach (POIXMLDocumentPart p in sheet.GetRelations())
                {
                    if (p.GetPackageRelationship().RelationshipType.Equals(XSSFRelation.TABLE.Relation))
                    {
                        XSSFTable table = (XSSFTable)p;
                        if (table.MapsTo(ctMap.ID))
                        {
                            tables.Add(table);
                        }
                    }
                }
            }

            return(tables);
        }