We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to change the displayed worksheet programmatically?

Thread ID:





123824 Apr 25,2016 08:18 AM UTC Apr 26,2016 12:37 PM UTC WPF 1
Tags: SfSpreadsheet
Michael Topf
Asked On April 25, 2016 08:18 AM UTC


I have an application with the sfspreadsheetcontrol. I load an excel-file with multiple worksheets. The active sheet at start is the firsdt worksheet which is also displayed in the control. Now I need to switch by code to another worksheet, so that the user sees those new worksheet (e.g. because as a result of a search, I know that the wanted cell is on sheet 2).

I can change the active sheet:  spreadsheetControl.ActiveSheet = spreadsheetControl.Workbook.Worksheets[worksheetname];

Now the active sheet has changed, but still the old worksheet is displayed by the control. I have tried something like: spreadsheetControl.ActiveSheet.Activate();

But the old worksheet is still active.

So what do I need to change, worksheet?


Kanimozhi Bharathi [Syncfusion]
Replied On April 26, 2016 12:37 PM UTC

Hi Michael, 

Thank you for contacting Syncfusion Support. 

We have added a new method “SetActiveSheet(“SheetName”) to set the active worksheet in SfSpreadsheet  and this method will be included in 2016Vol1 SP1 release which will be rolled out by the end of this month. 

if (this.Spreadsheet.SetActiveSheet("Sheet10")) 
MessageBox.Show("Sheet activated"); 

Kanimozhi B 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon