set active worksheet

Technical support for Spire.XLS

Moderators: iceblue support, Flash, Manager

set active worksheet

Postby Conisor » Fri Sep 01, 2017 2:54 pm

Hello i'm kind of new here.

I've been searching for the past 2 days but i can't find how to set the main worksheet that should be active on file open.

I'm doing some worksheet duplication in .net.

Is there a way to select the current active worksheet. Or to force the first sheet to be the active one?

I am asking this as when the worksheets get duplicated they all scroll to the right, thus when you open the file you have to scroll all the way to the left to see any

Pictures for clarity

Image

Image
Conisor
 
Posts: 2
Joined: Fri Sep 01, 2017 7:51 am

Re: set active worksheet

Postby Betsy.jiang » Mon Sep 04, 2017 2:38 am

Dear Conisor,

Sorry for late reply as weekend.
Spire.XLS supports that, please refer to code below.
Code: Select all
            workbook.Worksheets[1].Activate();
            //workbook.Worksheets["SheetName"].Activate();

If there is any question, please free free to contact us.

Thanks,
Betsy
E-iceblue support team
User avatar
Betsy.jiang
 
Posts: 1424
Joined: Tue Sep 06, 2016 8:30 am

Re: set active worksheet

Postby Conisor » Tue Sep 05, 2017 8:07 am

Thank you so much

That worked like a charm.
Conisor
 
Posts: 2
Joined: Fri Sep 01, 2017 7:51 am

Re: set active worksheet

Postby Betsy.jiang » Tue Sep 05, 2017 8:58 am

Dear Conisor,

Thanks for your feedback.
Please feel free to contact us if you have any question.

Sincerely,
Betsy
E-iceblue support team
User avatar
Betsy.jiang
 
Posts: 1424
Joined: Tue Sep 06, 2016 8:30 am


Return to Spire.XLS

Who is online

Users browsing this forum: No registered users and 3 guests