Documents for Excel, Java Edition Documentation
Features / Workbook / Workbook Views
In This Topic
    Workbook Views
    In This Topic

    GcExcel Java enables users to customize the workbook appearance based on specific preferences.

    You can use the getBookView method of the IWorkbook interface in order to set the workbook display as per your choice.

    The IWorkbookView interface provides the following methods to allow users to further customize essential display settings in the workbook:

    Methods Descriptions

    getDisplayHorizontalScrollBar setDisplayHorizontalScrollBar

    Used to get or set the display of the horizontal scrollbar.            

    getDisplayVerticalScrollBar

    setDisplayVerticalScrollBar

                  

    Used to get or set the display of the vertical scrollbar.

    getDisplayWorkbookTabs

    setDisplayWorkbookTabs

                   

    Used to get or set the display of the workbook tabs.

    getTabRatio

    setTabRatio

    Used to get or set the ratio of the width of the tab area (of the workbook) to the width of the horizontal scroll bar (of the worksheet). The value of TabRatio can be any number between 0 and 1. By default, if the TabRatio is not set, the value is 0.6.

    In order to set the workbook view and customize other display settings, refer to the following code snippet.

    Java
    Copy Code
    // Create a new workbook
    Workbook workbook = new Workbook();
            
    // Configure Workbook View Settings
    IWorkbookView bookView = workbook.getBookView();
    bookView.setDisplayVerticalScrollBar(false);
    bookView.setDisplayWorkbookTabs = true;
    bookView.setTabRatio(0.5);
            
    // Save to an excel file
    workbook.Save("ConfigureWorkbookView.xlsx");