Example #1
0
        public void AutoSizeColumn_trackAllColumns()
        {
            workbook = new SXSSFWorkbook();
            sheet    = workbook.CreateSheet() as SXSSFSheet;

            sheet.TrackAllColumnsForAutoSizing();
            sheet.AutoSizeColumn(0, useMergedCells);

            sheet.UntrackAllColumnsForAutoSizing();
            try
            {
                sheet.AutoSizeColumn(0, useMergedCells);
                Assert.Fail("Should not be able to auto-size an implicitly untracked column");
            }
            catch (InvalidOperationException)
            {
                // expected
            }
        }