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.

Wed Mar 14, 2018 6:29 am

I have used Spire.Xls for creating charts in Excel worksheet. But When I opens my excel workbook then it opens "Evaluation Warning" sheet by default. I want to open "Sheet1" by default. For this what should I do? Please suggest.

Baljeet
 
Posts: 3
Joined: Wed Mar 14, 2018 6:20 am

Wed Mar 14, 2018 8:50 am

Dear Baljeet,

Thanks for your inquiry.
Our Spire.Xls supports showing a specified sheet when opening an excel, please check below code. However, it can't work for your special case since it must show the "Evaluation Warning" sheet if you don't apply a license while using commercial version. Never mind, our sales team has sent a temporary license (1-month free) via email to help you verify it and have a better evaluation on our Spire.Xls. Please check your email and refer to this tutorial to apply the license: How to Apply the License by license key.
Code: Select all
//Set index of the active worksheet to 0, that is sheet1.
workbook.ActiveSheetIndex = 0;

Sinecrely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1187
Joined: Tue Sep 27, 2016 1:06 am

Wed Mar 14, 2018 9:46 am

Thank you for the reply.

Can you please confirm me the cost details for the license for 1 developer.

Baljeet
 
Posts: 3
Joined: Wed Mar 14, 2018 6:20 am

Wed Mar 14, 2018 10:03 am

Hello,

Thanks for your prompt reply.
Please check the price details as below link.
https://www.e-iceblue.com/Buy/Spire.XLS.html

How to choose the license subscription:
https://www.e-iceblue.com/Misc/purchase-policies.html

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1187
Joined: Tue Sep 27, 2016 1:06 am

Thu Mar 15, 2018 4:58 am

Hello

Thank you for your prompt reply.

I am using Spire.Xls for creating charts in excel file. Can you please guide me that which product should I buy out of all products of Spire.XLS for .NET. I have to use it for 1 developer only.

Regards,
Baljeet

Baljeet
 
Posts: 3
Joined: Wed Mar 14, 2018 6:20 am

Thu Mar 15, 2018 7:46 am

Hello,

Thanks for your feedback.
The Spire.XLS Pro Edition Developer Subscription is suitable for you.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1187
Joined: Tue Sep 27, 2016 1:06 am

Wed Jan 20, 2021 3:11 pm

Hi,

I have used "book.ActiveSheetIndex = 0;" still worksheet opens with "Evaluation Warning" by default.

Below is my code. Can you please help, I want to open Excel worksheet with first sheet.

Workbook book = new Workbook();
Worksheet sheet = book.Worksheets[0];
sheet.InsertDataTable(table, true, 1, 1);

book.ActiveSheetIndex = 0;

book.SaveToFile(PFilePath, ExcelVersion.Version2016);
System.Diagnostics.Process.Start(book.FileName);

Jayshree.nandekar
 
Posts: 5
Joined: Wed Apr 24, 2019 3:16 pm

Thu Jan 21, 2021 3:38 am

hello,

Thanks for your inquiry.
This is because that you haven’t applied a valid license to your project. We just sent you a temporary (one month free) license of Spire.XLS via email to help you remove the "Evaluation Warning" sheet.
Please check your email and refer to this tutorial to apply the license: How to Apply the License by license key.

Feel free to contact us if you have further questions.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Thu Feb 04, 2021 1:29 pm

Thank you so much for your response.

In below code I am saving the workbook only to open it. Is there a option to open a workbook without saving it. I want user to save it.

And how can I make the column width fit to the data. It's showing truncated data.
And can I suppress the warning "Number in the field formatted as text"

Please help.

Workbook book = new Workbook();
Worksheet sheet = book.Worksheets[0];
sheet.InsertDataTable(table, true, 1, 1);

book.ActiveSheetIndex = 0;

book.SaveToFile(PFilePath, ExcelVersion.Version2016);
System.Diagnostics.Process.Start(book.FileName);

Jayshree.nandekar
 
Posts: 5
Joined: Wed Apr 24, 2019 3:16 pm

Fri Feb 05, 2021 3:19 am

Hello,

Thanks for your response.
We are sorry that there is no option to open a workbook without saving it.
As for autofitting column width, please refer to the following code.
Code: Select all
            …
            for (int i = 1; i <= sheet.LastColumn; i++)
            {
                sheet.AutoFitColumn(i);
            }
            …

Besides, regarding the warning "Number in the field formatted as text", do you mean this?
screenshot.png
screenshot.png (8.2 KiB) Viewed 3117 times

If so, please refer to the following code to remove it. Or if I misunderstood, please describe it in detail.
Code: Select all
            …
            sheet.Range["B1:B5"].ConvertToNumber();
            …


Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Mon Feb 22, 2021 1:31 am

Hello,

Has your issue been resolved? Any feedback will be greatly appreciated.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Return to Spire.XLS