EPPlusSoftware / EPPlus

EPPlus-Excel spreadsheets for .NET
https://epplussoftware.com
Other
1.78k stars 273 forks source link

Update TabSelected and TopLeftCell #924

Closed TheR7angelo closed 7 months ago

TheR7angelo commented 1 year ago

Hi i've got this error when I change properties TopLeftCell and SetTabSelected from Worksheet view

` var package = new ExcelPackage(file); var workbook = package.Workbook; var sheet = workbook.Worksheets[0];

var sheetView = sheet.View;

sheetView.SetTabSelected(); sheetView.TopLeftCell = "W96";

package.Save(); ` the lines are frozen elsewhere

bug.xlsx original.xlsx

JanKallman commented 1 year ago

Hi, Try this:

sheetView.PaneSettings.TopLeftCell = "W96";
sheetView.Panes[2].SelectedRange = "W96";  //Index 2 is the bottom right pane.
sheetView.Panes[2].ActiveCell = "W96";

I will have a look how this works with with splitted panes.

OssianEPPlus commented 7 months ago

Closed due to inactivity.