Can't find what you're looking for?

Contact us or post in our forums and we'll help you find an answer.

Remove the additional gray/white space in pure JavaScript


To remove the additional space in a SpreadJS instance set the scrollBarMaxAlign option to True. This will remove the space and only allow users to scroll to ends of the sheet or the last column/row.

Steps to Complete:

Set scrollBarMaxAlign to True

Getting Started:

Set scrollBarMaxAlign to True

Set the scrollBarMaxAlign option to True to specify that we want to set the scroll bar to be aligned with the last row and column of the active sheet.

var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));

document.getElementById("btn").addEventListener("click", function() {
  var spreadContainer = document.getElementById("ss");
  // set scrollbar max align to True
  spread.options.scrollbarMaxAlign = true;

For an additional reference, here is a link to a live code sample showing this: