Example usage for org.apache.poi.ss.usermodel Sheet isDisplayZeros

List of usage examples for org.apache.poi.ss.usermodel Sheet isDisplayZeros

Introduction

In this page you can find the example usage for org.apache.poi.ss.usermodel Sheet isDisplayZeros.

Prototype

boolean isDisplayZeros();

Source Link

Document

Gets the flag indicating whether the window should show 0 (zero) in cells containing zero value.

Usage

From source file:uk.co.spudsoft.birt.emitters.excel.tests.BasicReportTest.java

License:Open Source License

@Test
public void testRunReportWithJpegXlsxFormulasReport() throws BirtException, IOException {

    InputStream inputStream = runAndRenderReport("SimpleWithJpegDisplayFormulas.rptdesign", "xlsx");
    assertNotNull(inputStream);/*ww w  .  j  a  va  2s  .c om*/
    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();
    }
}

From source file:uk.co.spudsoft.birt.emitters.excel.tests.BasicReportTest.java

License:Open Source License

@Test
public void testRunReportWithJpegXlsxGridlinesRenderOption() throws BirtException, IOException {

    displayGridlines = false;//w  ww  .ja  v  a  2s.com
    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(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 testRunReportWithJpegXlsxGridlinesReport() throws BirtException, IOException {

    InputStream inputStream = runAndRenderReport("SimpleWithJpegHideGridlines.rptdesign", "xlsx");
    assertNotNull(inputStream);/*w  w  w  .jav a2  s  . co  m*/
    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(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 testRunReportWithJpegXlsxRowColHeadingsRenderOption() throws BirtException, IOException {

    displayRowColHeadings = false;//from   w  w  w. j  a va2 s.co  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(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 testRunReportWithJpegXlsxRowColHeadingsReport() throws BirtException, IOException {

    InputStream inputStream = runAndRenderReport("SimpleWithJpegHideRowColHeadings.rptdesign", "xlsx");
    assertNotNull(inputStream);/*  w  w  w . j a  v  a2  s.co m*/
    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(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 testRunReportWithJpegXlsxZerosRenderOption() throws BirtException, IOException {

    displayZeros = false;/*from w w w  .java  2s. c om*/
    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(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 testRunReportWithJpegXlsxZerosReport() throws BirtException, IOException {

    InputStream inputStream = runAndRenderReport("SimpleWithJpegHideZeros.rptdesign", "xlsx");
    assertNotNull(inputStream);/*w ww.j av  a  2  s.c  o m*/
    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(false, sheet.isDisplayFormulas());
        assertEquals(true, sheet.isDisplayGridlines());
        assertEquals(true, sheet.isDisplayRowColHeadings());
        assertEquals(false, sheet.isDisplayZeros());
        performSimpleWithJpegTests(sheet);
    } finally {
        inputStream.close();
    }
}