Documents for Excel .NET Edition | GCDocuments
Features / Workbook / Workbook Views
In This Topic
    Workbook Views
    In This Topic

    GcExcel allows users to personalize the display of the workbook. You can use the BookView property of the IWorkbook interface to set the view of the workbook as per your preferences.

    The following properties of the IWorkbookView interface allows users to further customize various display settings in the workbook.

    1. DisplayHorizontalScrollBar - This property gets and sets the display of the horizontal scrollbar.
    2. DisplayVerticalScrollBar- This property gets and sets the display of the vertical scrollbar.
    3. DisplayWorkbookTabs- This property gets and sets if the workbook tabs are displayed.
    4. TabRatio - This property gets and sets 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.

    Refer to the following code snippet to set workbook view and customize other display settings.

    Copy Code
    //Set workbook view
    IWorkbook workbook = new Workbook();
    var bookView = workbook.BookView;
    bookView.DisplayHorizontalScrollBar = true;
    bookView.DisplayVerticalScrollBar = true;
    bookView.DisplayWorkbookTabs = true;
    bookView.TabRatio = 0.8;