[]
Use this interface to customize workbook-level display settings such as scroll bars, workbook tabs, and the tab area ratio. Obtain an IWorkbookView instance from Workbook.getBookView().
IWorkbookView bookView = workbook.getBookView();
bookView.setDisplayVerticalScrollBar(false);
bookView.setDisplayWorkbookTabs(true);
bookView.setTabRatio(0.5);
booleanbooleanbooleanbooleanbooleanbooleanbooleandoubleintvoidsetAllowSheetReorder(boolean value) voidsetBackColor(Color color) voidsetDisplayHorizontalScrollBar(boolean value) voidsetDisplayVerticalScrollBar(boolean value) voidsetDisplayWorkbookTabs(boolean value) voidsetGrayAreaBackColor(Color color) voidsetNewTabVisible(boolean value) voidsetNumbersFitMode(NumbersFitMode value) voidsetTabEditable(boolean value) voidsetTabNavigationVisible(boolean value) voidsetTabRatio(double value) voidvoidsetTabStripWidth(int value) This property applies to the workbook view.
IWorkbookView bookView = workbook.getBookView();
bookView.setDisplayHorizontalScrollBar(true);
boolean displayHorizontalScrollBar = bookView.getDisplayHorizontalScrollBar();
true if the horizontal scroll bar is displayed; otherwise, false.This property applies to the workbook view.
IWorkbookView bookView = workbook.getBookView();
bookView.setDisplayHorizontalScrollBar(true);
value - true if the horizontal scroll bar is displayed; otherwise, false.This property indicates whether the workbook view shows the vertical scroll bar.
IWorkbookView bookView = workbook.getBookView();
bookView.setDisplayVerticalScrollBar(false);
boolean displayVerticalScrollBar = bookView.getDisplayVerticalScrollBar();
true if the vertical scroll bar is displayed; otherwise, false.This property indicates whether the workbook view shows the vertical scroll bar.
IWorkbookView bookView = workbook.getBookView();
bookView.setDisplayVerticalScrollBar(false);
value - true if the vertical scroll bar is displayed; otherwise, false.The returned value is a number between 0 and 1. The default value is 0.6.
IWorkbookView bookView = workbook.getBookView();
bookView.setTabRatio(0.5);
double tabRatio = bookView.getTabRatio();
This value is a number between 0 and 1. The default value is 0.6.
IWorkbookView bookView = workbook.getBookView();
bookView.setTabRatio(0.5);
value - The ratio of the workbook tab area width to the horizontal scroll bar width.This property indicates whether the sheet tab strip is visible in the workbook view.
IWorkbookView bookView = workbook.getBookView();
bookView.setDisplayWorkbookTabs(true);
boolean displayWorkbookTabs = bookView.getDisplayWorkbookTabs();
true if the workbook tabs are displayed; otherwise, false.This property indicates whether the sheet tab strip is visible in the workbook view.
IWorkbookView bookView = workbook.getBookView();
bookView.setDisplayWorkbookTabs(true);
value - true if the workbook tabs are displayed; otherwise, false.This property applies to SpreadJS only. It returns the workbook view background color that is applied across worksheets.
IWorkbookView bookView = workbook.getBookView();
bookView.setBackColor(Color.GetLightGray());
Color backColor = bookView.getBackColor();
This property applies to SpreadJS only. Use this method to set the workbook view background color that is applied across worksheets.
IWorkbookView bookView = workbook.getBookView();
bookView.setBackColor(Color.GetLightGray());
Color backColor = bookView.getBackColor();
color - The background color to apply to all worksheets. Must not be null.NullPointerException - if color is null.This property applies to the gray area displayed around worksheets in a SpreadJS workbook view.
IWorkbookView bookView = workbook.getBookView();
bookView.setGrayAreaBackColor(Color.GetBlue());
Color grayAreaBackColor = bookView.getGrayAreaBackColor();
This property applies to the gray area displayed around worksheets in a SpreadJS workbook view.
IWorkbookView bookView = workbook.getBookView();
bookView.setGrayAreaBackColor(Color.GetBlue());
color - The background color of the workbook's gray area.This property applies to SpreadJS only.
IWorkbookView bookView = workbook.getBookView();
bookView.setTabEditable(true);
boolean tabEditable = bookView.getTabEditable();
true if editing worksheet tab names is allowed; otherwise, false.This property applies to SpreadJS only.
IWorkbookView bookView = workbook.getBookView();
bookView.setTabEditable(true);
value - true if editing worksheet tab names is allowed; otherwise, false.This property applies to SpreadJS workbook tabs.
IWorkbookView bookView = workbook.getBookView();
bookView.setAllowSheetReorder(true);
boolean allowSheetReorder = bookView.getAllowSheetReorder();
true if worksheet tabs can be reordered; otherwise, false.This property applies to SpreadJS workbook tabs.
IWorkbookView bookView = workbook.getBookView();
bookView.setAllowSheetReorder(true);
value - true if worksheet tabs can be reordered; otherwise, false.This property applies to the SpreadJS workbook tab strip.
IWorkbookView bookView = workbook.getBookView();
bookView.setNewTabVisible(false);
boolean newTabVisible = bookView.getNewTabVisible();
true if the New Tab button is visible; otherwise, false.This property applies to the SpreadJS workbook tab strip.
IWorkbookView bookView = workbook.getBookView();
bookView.setNewTabVisible(false);
value - true if the New Tab button is visible; otherwise, false.This property applies to the SpreadJS workbook tab strip and returns where the tab strip is displayed around the workbook.
IWorkbookView bookView = workbook.getBookView();
bookView.setTabStripPosition(SpreadJSTabStripPosition.Top);
SpreadJSTabStripPosition tabStripPosition = bookView.getTabStripPosition();
SpreadJSTabStripPosition value that indicates whether the tab strip is displayed at the top, bottom, left, or right side of the workbook.This property applies to the SpreadJS workbook tab strip and determines whether the tab strip is displayed at the top, bottom, left, or right side of the workbook.
IWorkbookView bookView = workbook.getBookView();
bookView.setTabStripPosition(SpreadJSTabStripPosition.Top);
value - A SpreadJSTabStripPosition value that specifies where the tab strip is displayed. Must not be null.This property applies to the SpreadJS workbook tab strip.
IWorkbookView bookView = workbook.getBookView();
bookView.setTabStripWidth(120);
int tabStripWidth = bookView.getTabStripWidth();
This property applies to SpreadJS only.
IWorkbookView bookView = workbook.getBookView();
bookView.setTabStripWidth(120);
value - The width of the tab strip, in pixels. Must be 80 or greater.This property applies to SpreadJS only. The returned NumbersFitMode specifies whether overflowing date or number content is displayed as ### or allowed to overflow into an adjacent empty cell as text.
IWorkbookView bookView = workbook.getBookView();
worksheet.getRange("A1").setValue(123456789);
bookView.setNumbersFitMode(NumbersFitMode.Overflow);
NumbersFitMode numbersFitMode = bookView.getNumbersFitMode();
NumbersFitMode that specifies how date or number content is displayed when it exceeds the column width.This property applies to SpreadJS only. Use NumbersFitMode.Mask to display overflowing date or number content as ###, or NumbersFitMode.Overflow to display the content as text and allow it to overflow into an adjacent empty cell.
IWorkbookView bookView = workbook.getBookView();
worksheet.getRange("A1").setValue(123456789);
bookView.setNumbersFitMode(NumbersFitMode.Overflow);
value - The NumbersFitMode value that specifies how date or number content is displayed when it exceeds the column width. Must not be null.