예제 #1
0
        public XmlMap ImportXsd(Workbook workbook)
        {
            //clear the old pde xsd map if it existed.
            XmlMaps xms = workbook.XmlMaps;

            foreach (XmlMap map in xms)
            {
                if (PDE_XSD_MAP_NAME.Equals(map.Name))
                {
                    map.Delete();
                    break;
                }
            }
            //import new xsd
            XmlMap xmap = xms.Add(CreateXsd());

            xmap.Name = PDE_XSD_MAP_NAME;
            return(xmap);
        }
예제 #2
0
        public XmlMap ExportXsd(Workbook workbook)
        {
            //clear the old pde xsd map if it existed.
            XmlMaps xms = workbook.XmlMaps;

            foreach (XmlMap map in xms)
            {
                if (PDE_EXP_XSD_MAP_NAME.Equals(map.Name))
                {
                    map.Delete();
                    break;
                }
            }
            //import new xsd
            XmlMap xmap = xms.Add(genExpXsd());

            xmap.Name = PDE_EXP_XSD_MAP_NAME;
            //DO NOT link the excel cell or table to xsd now, we will link them after render and delete the import xsd.
            //linkToXsd(workbook);
            return(xmap);
        }