Beispiel #1
0
        public void TestAddNew()
        {
            XSSFWorkbook wb = new XSSFWorkbook();
            XSSFSheet    s  = wb.CreateSheet() as XSSFSheet;

            Assert.AreEqual(null, wb.GetTheme());

            StylesTable styles = wb.GetStylesSource();

            Assert.AreEqual(null, styles.GetTheme());

            styles.EnsureThemesTable();

            Assert.IsNotNull(styles.GetTheme());
            Assert.IsNotNull(wb.GetTheme());

            wb     = XSSFTestDataSamples.WriteOutAndReadBack(wb) as XSSFWorkbook;
            styles = wb.GetStylesSource();
            Assert.IsNotNull(styles.GetTheme());
            Assert.IsNotNull(wb.GetTheme());
        }