com.groupdocs.viewer.converter.options

Class CellsOptions



  • public class CellsOptions
    extends Object

    Provides options for rendering Cells documents.

    • Field Detail

      • COUNT_ROWS_PER_PAGE_DEFAULT

        public static final int COUNT_ROWS_PER_PAGE_DEFAULT
        See Also:
        Constant Field Values
      • ONE_PAGE_PER_SHEET_DEFAULT

        public static final boolean ONE_PAGE_PER_SHEET_DEFAULT
        See Also:
        Constant Field Values
      • RENDER_PRINT_AREA_ONLY_DEFAULT

        public static final boolean RENDER_PRINT_AREA_ONLY_DEFAULT
        See Also:
        Constant Field Values
      • SHOW_GRID_LINES_DEFAULT

        public static final boolean SHOW_GRID_LINES_DEFAULT
        See Also:
        Constant Field Values
      • TEXT_OVERFLOW_MODE_DEFAULT

        public static final int TEXT_OVERFLOW_MODE_DEFAULT
        See Also:
        Constant Field Values
    • Constructor Detail

      • CellsOptions

        public CellsOptions()

        Initializes a new instance of the CellsOptions class.

    • Method Detail

      • getCountRowsPerPage

        public int getCountRowsPerPage()

        The number of rows rendered into one page when one page per sheet rendering mode is not enabled. Default value is 50.

        The following example demonstrates how to set rendering of 100 rows into each page.
        Returns:
        a int.
      • getEncoding

        public Charset getEncoding()

        The text (*.csv) document encoding.

        The following example demonstrates how to set Encoding for rendering csv documents.
        Returns:
        a Charset object.
      • getIgnoreEmptyRows

        public boolean getIgnoreEmptyRows()
      • getInternalHyperlinkPrefix

        public String getInternalHyperlinkPrefix()

        Prefix for hyperlink that references worksheet inside the same document.

        The following example demonstrates how to set prefix for internal hyperlinks. Excel workbook may contain hyperlink to specific location in the same workbook. Internal hyperlink prefix is useful for applications where workbook sheets are rendered separately one by one. In this case internal hyperlink may contain some REST API method address with referenced sheet name. Value may contain page number placeholder which will be substituted with referenced sheet number.
        Returns:
        a String object.
      • getOnePagePerSheet

        public boolean getOnePagePerSheet()

        Specifies worksheet rendering mode. Default value is true.

        The following example demonstrates how to enable one page per sheet rendering mode. When one page per sheet rendering is enabled, all worksheet content is rendered into a single page. Otherwise worksheet content is divided into pages, where each page includes count of rows defined in count rows per page option.
        Returns:
        a boolean.
      • getRenderPrintAreaOnly

        public boolean getRenderPrintAreaOnly()
      • getShowGridLines

        public boolean getShowGridLines()

        Indicates whether to show grid lines in converted document. The default value is false.

        The following example demonstrates how to set ShowGridLines property.
        Returns:
        a boolean.
      • getShowHiddenColumns

        public boolean getShowHiddenColumns()
      • getShowHiddenRows

        public boolean getShowHiddenRows()
      • getTextOverflowMode

        public int getTextOverflowMode()

        Text overflow mode applied when the text is too big to fit into the cell. Default value is TextOverflowMode.OverlayIfNextIsEmpty.

        The following example demonstrates how to set TextOverflowMode property. Text overflow mode is only applicable for rendering into HTML.
        Returns:
        a int.
      • setCountRowsPerPage

        public void setCountRowsPerPage(int value)

        The number of rows rendered into one page when one page per sheet rendering mode is not enabled. Default value is 50.

        The following example demonstrates how to set rendering of 100 rows into each page.
        Parameters:
        value - a int.
      • setEncoding

        public void setEncoding(Charset value)

        The text (*.csv) document encoding.

        The following example demonstrates how to set Encoding for rendering csv documents.
        Parameters:
        value - a Charset object.
      • setIgnoreEmptyRows

        public void setIgnoreEmptyRows(boolean value)
      • setInternalHyperlinkPrefix

        public void setInternalHyperlinkPrefix(String value)

        Prefix for hyperlink that references worksheet inside the same document.

        The following example demonstrates how to set prefix for internal hyperlinks. Excel workbook may contain hyperlink to specific location in the same workbook. Internal hyperlink prefix is useful for applications where workbook sheets are rendered separately one by one. In this case internal hyperlink may contain some REST API method address with referenced sheet name. Value may contain page number placeholder which will be substituted with referenced sheet number.
        Parameters:
        value - a String object.
      • setOnePagePerSheet

        public void setOnePagePerSheet(boolean value)

        Specifies worksheet rendering mode. Default value is true.

        The following example demonstrates how to enable one page per sheet rendering mode. When one page per sheet rendering is enabled, all worksheet content is rendered into a single page. Otherwise worksheet content is divided into pages, where each page includes count of rows defined in count rows per page option.
        Parameters:
        value - a boolean.
      • setRenderPrintAreaOnly

        public void setRenderPrintAreaOnly(boolean value)
      • setShowGridLines

        public void setShowGridLines(boolean value)

        Indicates whether to show grid lines in converted document. The default value is false.

        The following example demonstrates how to set ShowGridLines property.
        Parameters:
        value - a boolean.
      • setShowHiddenColumns

        public void setShowHiddenColumns(boolean value)
      • setShowHiddenRows

        public void setShowHiddenRows(boolean value)
      • setTextOverflowMode

        public void setTextOverflowMode(int value)

        Text overflow mode applied when the text is too big to fit into the cell. Default value is TextOverflowMode.OverlayIfNextIsEmpty.

        The following example demonstrates how to set TextOverflowMode property. Text overflow mode is only applicable for rendering into HTML.
        Parameters:
        value - a int.