Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

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: 5
Joined: Fri Sep 01, 2017 7:51 am

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: 3099
Joined: Tue Sep 06, 2016 8:30 am

Tue Sep 05, 2017 8:07 am

Thank you so much

That worked like a charm.

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

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: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.XLS