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

Sun Apr 14, 2024 2:08 pm

Hello,

I met the similar problem today, the activated sheet was the last sheet in generated xlsx.file, you know, the 'Evaluation Warning sheet'

And then, I used this code refered in the website ,

Code: Select all
# workbook.Worksheets["Table Catalog"].Activate();



It does not works.

Could you tell me the reason for that?

related version:
Python 3.7
Spire.XLS-14.2.2 (not inclued license)
plum-dispatch-1.7.4

realrxen
 
Posts: 2
Joined: Sun Apr 14, 2024 2:01 pm

Sun Apr 14, 2024 5:22 pm

Betsy.jiang wrote:Dear Conisor,

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

Sincerely,
Betsy
E-iceblue support team

Hello,

I met the similar problem today, the activated sheet was the last sheet in generated xlsx.file, you know, the 'Evaluation Warning sheet'

And then, I used this code refered in the website ,

CODE: SELECT ALL
# workbook.Worksheets["Table Catalog"].Activate();



It does not works.

Could you tell me the reason for that?

related version:
Python 3.7
Spire.XLS-14.2.2 (not inclued license)
plum-dispatch-1.7.4

realrxen
 
Posts: 2
Joined: Sun Apr 14, 2024 2:01 pm

Mon Apr 15, 2024 5:54 am

Hi,

Thanks for your inquiry.
The reason of your issue is that the avtive sheet will be set to the last sheet (Evaluation Warning sheet) if you don’t apply license when using commercial version of Spire.Xls.
For new user, we will to provide a month temporary license to help you remove warning message and limitations. If you need it, you can contact our sales team via email(sales@e-iceblue.com).

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Return to Spire.XLS