Search code examples
.netexcelasp.net-mvc-4gembox-spreadsheet

GemBox - scroll into view functionality missing?


I'm working with GemBox (version 3.5) for the first time and have one problem. When opening a generated XLSX file, it is always scrolled to the bottom of the worksheet. I (or, rather, my customer) want it to start out at the top left position.

Is there any way to programmatically set the top visible cell before saving, i.e a "scroll into view" or "scroll to top" function? I haven't found anything in the GemBox documentation or on the interwebs that addresses this issue.


Solution

  • After some digging I found another way of doing it with ViewOptions on Worksheet ('ws' in this example):

    ws.ViewOptions.FirstVisibleColumn = 0;
    ws.ViewOptions.FirstVisibleRow = 0;