List of usage examples for org.apache.poi.ss.usermodel Sheet isDisplayZeros
boolean isDisplayZeros();
From source file:uk.co.spudsoft.birt.emitters.excel.tests.BasicReportTest.java
License:Open Source License
@Test public void testRunReportWithJpegXls() throws BirtException, IOException { InputStream inputStream = runAndRenderReport("SimpleWithJpeg.rptdesign", "xls"); assertNotNull(inputStream);/* ww w . j a va 2 s.c om*/ try { HSSFWorkbook workbook = new HSSFWorkbook(inputStream); assertNotNull(workbook); assertEquals(1, workbook.getNumberOfSheets()); assertEquals("Simple Test Report", workbook.getSheetAt(0).getSheetName()); Sheet sheet = workbook.getSheetAt(0); assertEquals(false, sheet.isDisplayFormulas()); assertEquals(true, sheet.isDisplayGridlines()); assertEquals(true, sheet.isDisplayRowColHeadings()); assertEquals(true, sheet.isDisplayZeros()); performSimpleWithJpegTests(sheet); // Unfortunately it's not currently possible/easy to check the dimensions of images using POI // So the XL file has to be opened manually for verification } finally { inputStream.close(); } }
From source file:uk.co.spudsoft.birt.emitters.excel.tests.BasicReportTest.java
License:Open Source License
@Test public void testRunReportWithJpegXlsFormulasRenderOption() throws BirtException, IOException { displayFormulas = true;//from www .j a v a 2s .c o m InputStream inputStream = runAndRenderReport("SimpleWithJpeg.rptdesign", "xls"); assertNotNull(inputStream); try { HSSFWorkbook workbook = new HSSFWorkbook(inputStream); assertNotNull(workbook); assertEquals(1, workbook.getNumberOfSheets()); assertEquals("Simple Test Report", workbook.getSheetAt(0).getSheetName()); Sheet sheet = workbook.getSheetAt(0); assertEquals(true, sheet.isDisplayFormulas()); assertEquals(true, sheet.isDisplayGridlines()); assertEquals(true, sheet.isDisplayRowColHeadings()); assertEquals(true, sheet.isDisplayZeros()); performSimpleWithJpegTests(sheet); } finally { inputStream.close(); } }
From source file:uk.co.spudsoft.birt.emitters.excel.tests.BasicReportTest.java
License:Open Source License
@Test public void testRunReportWithJpegXlsFormulasReport() throws BirtException, IOException { InputStream inputStream = runAndRenderReport("SimpleWithJpegDisplayFormulas.rptdesign", "xls"); assertNotNull(inputStream);//w w w . jav a 2s.co m try { HSSFWorkbook workbook = new HSSFWorkbook(inputStream); assertNotNull(workbook); assertEquals(1, workbook.getNumberOfSheets()); assertEquals("Simple Test Report", workbook.getSheetAt(0).getSheetName()); Sheet sheet = workbook.getSheetAt(0); assertEquals(true, sheet.isDisplayFormulas()); assertEquals(true, sheet.isDisplayGridlines()); assertEquals(true, sheet.isDisplayRowColHeadings()); assertEquals(true, sheet.isDisplayZeros()); performSimpleWithJpegTests(sheet); } finally { inputStream.close(); } }
From source file:uk.co.spudsoft.birt.emitters.excel.tests.BasicReportTest.java
License:Open Source License
@Test public void testRunReportWithJpegXlsGridlinesRenderOption() throws BirtException, IOException { displayGridlines = false;//from w w w .jav a 2 s . co m InputStream inputStream = runAndRenderReport("SimpleWithJpeg.rptdesign", "xls"); assertNotNull(inputStream); try { HSSFWorkbook workbook = new HSSFWorkbook(inputStream); assertNotNull(workbook); assertEquals(1, workbook.getNumberOfSheets()); assertEquals("Simple Test Report", workbook.getSheetAt(0).getSheetName()); Sheet sheet = workbook.getSheetAt(0); assertEquals(false, sheet.isDisplayFormulas()); assertEquals(false, sheet.isDisplayGridlines()); assertEquals(true, sheet.isDisplayRowColHeadings()); assertEquals(true, sheet.isDisplayZeros()); performSimpleWithJpegTests(sheet); } finally { inputStream.close(); } }
From source file:uk.co.spudsoft.birt.emitters.excel.tests.BasicReportTest.java
License:Open Source License
@Test public void testRunReportWithJpegXlsGridlinesReport() throws BirtException, IOException { InputStream inputStream = runAndRenderReport("SimpleWithJpegHideGridlines.rptdesign", "xls"); assertNotNull(inputStream);/*from w ww .ja v a2s . c o m*/ try { HSSFWorkbook workbook = new HSSFWorkbook(inputStream); assertNotNull(workbook); assertEquals(1, workbook.getNumberOfSheets()); assertEquals("Simple Test Report", workbook.getSheetAt(0).getSheetName()); Sheet sheet = workbook.getSheetAt(0); assertEquals(false, sheet.isDisplayFormulas()); assertEquals(false, sheet.isDisplayGridlines()); assertEquals(true, sheet.isDisplayRowColHeadings()); assertEquals(true, sheet.isDisplayZeros()); performSimpleWithJpegTests(sheet); } finally { inputStream.close(); } }
From source file:uk.co.spudsoft.birt.emitters.excel.tests.BasicReportTest.java
License:Open Source License
@Test public void testRunReportWithJpegXlsRowColHeadingsRenderOption() throws BirtException, IOException { displayRowColHeadings = false;//ww w. jav a 2 s .c o m InputStream inputStream = runAndRenderReport("SimpleWithJpeg.rptdesign", "xls"); assertNotNull(inputStream); try { HSSFWorkbook workbook = new HSSFWorkbook(inputStream); assertNotNull(workbook); assertEquals(1, workbook.getNumberOfSheets()); assertEquals("Simple Test Report", workbook.getSheetAt(0).getSheetName()); Sheet sheet = workbook.getSheetAt(0); assertEquals(false, sheet.isDisplayFormulas()); assertEquals(true, sheet.isDisplayGridlines()); assertEquals(false, sheet.isDisplayRowColHeadings()); assertEquals(true, sheet.isDisplayZeros()); performSimpleWithJpegTests(sheet); } finally { inputStream.close(); } }
From source file:uk.co.spudsoft.birt.emitters.excel.tests.BasicReportTest.java
License:Open Source License
@Test public void testRunReportWithJpegXlsRowColHeadingsReport() throws BirtException, IOException { InputStream inputStream = runAndRenderReport("SimpleWithJpegHideRowColHeadings.rptdesign", "xls"); assertNotNull(inputStream);//from w w w . jav a 2s. com try { HSSFWorkbook workbook = new HSSFWorkbook(inputStream); assertNotNull(workbook); assertEquals(1, workbook.getNumberOfSheets()); assertEquals("Simple Test Report", workbook.getSheetAt(0).getSheetName()); Sheet sheet = workbook.getSheetAt(0); assertEquals(false, sheet.isDisplayFormulas()); assertEquals(true, sheet.isDisplayGridlines()); assertEquals(false, sheet.isDisplayRowColHeadings()); assertEquals(true, sheet.isDisplayZeros()); performSimpleWithJpegTests(sheet); } finally { inputStream.close(); } }
From source file:uk.co.spudsoft.birt.emitters.excel.tests.BasicReportTest.java
License:Open Source License
@Test public void testRunReportWithJpegXlsZerosRenderOption() throws BirtException, IOException { displayZeros = false;//from ww w. j a v a 2 s .c o m InputStream inputStream = runAndRenderReport("SimpleWithJpeg.rptdesign", "xls"); assertNotNull(inputStream); try { HSSFWorkbook workbook = new HSSFWorkbook(inputStream); assertNotNull(workbook); assertEquals(1, workbook.getNumberOfSheets()); assertEquals("Simple Test Report", workbook.getSheetAt(0).getSheetName()); Sheet sheet = workbook.getSheetAt(0); assertEquals(false, sheet.isDisplayFormulas()); assertEquals(true, sheet.isDisplayGridlines()); assertEquals(true, sheet.isDisplayRowColHeadings()); assertEquals(false, sheet.isDisplayZeros()); performSimpleWithJpegTests(sheet); } finally { inputStream.close(); } }
From source file:uk.co.spudsoft.birt.emitters.excel.tests.BasicReportTest.java
License:Open Source License
@Test public void testRunReportWithJpegXlsZerosReport() throws BirtException, IOException { InputStream inputStream = runAndRenderReport("SimpleWithJpegHideZeros.rptdesign", "xls"); assertNotNull(inputStream);//from w ww . ja v a 2 s . c o m try { HSSFWorkbook workbook = new HSSFWorkbook(inputStream); assertNotNull(workbook); assertEquals(1, workbook.getNumberOfSheets()); assertEquals("Simple Test Report", workbook.getSheetAt(0).getSheetName()); Sheet sheet = workbook.getSheetAt(0); assertEquals(false, sheet.isDisplayFormulas()); assertEquals(true, sheet.isDisplayGridlines()); assertEquals(true, sheet.isDisplayRowColHeadings()); assertEquals(false, sheet.isDisplayZeros()); performSimpleWithJpegTests(sheet); } finally { inputStream.close(); } }
From source file:uk.co.spudsoft.birt.emitters.excel.tests.BasicReportTest.java
License:Open Source License
@Test public void testRunReportWithJpegXlsxFormulasRenderOption() throws BirtException, IOException { displayFormulas = true;/* w w w.j av a2s. c o m*/ InputStream inputStream = runAndRenderReport("SimpleWithJpeg.rptdesign", "xlsx"); assertNotNull(inputStream); try { XSSFWorkbook workbook = new XSSFWorkbook(inputStream); assertNotNull(workbook); assertEquals(1, workbook.getNumberOfSheets()); assertEquals("Simple Test Report", workbook.getSheetAt(0).getSheetName()); Sheet sheet = workbook.getSheetAt(0); assertEquals(true, sheet.isDisplayFormulas()); assertEquals(true, sheet.isDisplayGridlines()); assertEquals(true, sheet.isDisplayRowColHeadings()); assertEquals(true, sheet.isDisplayZeros()); performSimpleWithJpegTests(sheet); } finally { inputStream.close(); } }