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 Jan 23, 2019 1:49 pm

I am getting this issue (The type initializer for 'sprន' threw an exception.) while executing below line.

Spire.Xls.Workbook workbook = new Workbook();

I am using Spire.Xls 9.1.0 in C# dotnetcore 2.0.

jitendra.barai
 
Posts: 1
Joined: Wed Jan 23, 2019 12:02 pm

Thu Jan 24, 2019 2:15 am

Hi,

Thanks for your inquiry.
Sorry that our Spire.XLS does not support working with .NET Core at present.
Our Dev team are working on it and we plan to release it in March 2019. If it is available, we will let you know.

Sincerely,
Anna
E-iceblue support team
User avatar

Anna.Zhang
 
Posts: 73
Joined: Thu Sep 27, 2018 3:20 am

Fri Feb 01, 2019 10:10 am

Hi,

Thanks for your waiting.
We are glad to inform that our Spire.XLS supports working with .NET core now. Please download our Spire.XLS Pack(Hotfix) Version:9.1.22 from the following URL:
https://www.e-iceblue.com/Download/down ... t-now.html
https://www.nuget.org/packages/Spire.XLS/

If there is any question, please feel free to let us know. We are always here for help.

Best wishes,
Betsy
E-iceblue support tam
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Fri Jun 23, 2023 8:19 pm

I am working on a .Net application. I am using Spire 4.7 license.
I recently implemented Datatable to .xls and I am running into this error.
Error is from this line:
//export datatable to excel
Workbook book = new Workbook();
I have tried to replace my dll with the one from your hotfix in 13.6.0 but the issue has continued.
I would appreciate any further help you can give. Thanks!

FrancisIzu
 
Posts: 4
Joined: Fri Jun 23, 2023 7:19 pm

Sun Jun 25, 2023 5:49 am

Hello,

Thanks for your inquiry.
For your issue, please remove all Spire dlls from your project first and then install our latest Spire.Office Platinum(Hotfix) Version:8.6.0 for testing. If your problem still exists, please provide us with your complete test code and exception information to help us investigate further. Thanks in advance.

Sincerely,
Swain
E-iceblue support team
User avatar

Swain.Wang
 
Posts: 34
Joined: Thu Jun 01, 2023 3:55 am

Fri Jun 30, 2023 1:03 am

Hi Swain,
Great, it passed that error and now got stuck in the download to path.
Here is the error
{"Access to the path 'C:\\Program Files\\IIS Express\\insertTableToExcel.xls' is denied."}. How do I save directly to the downloads folder for anyone using the application?

Secondly, how do I reconcile the license I have with this new hot-fix dlls you sent me?
Thanks!

FrancisIzu
 
Posts: 4
Joined: Fri Jun 23, 2023 7:19 pm

Mon Jul 03, 2023 1:19 am

Hello,

Thanks for your reply.
For your first issue, you can use the special folder path for the downloads directory in Windows, as shown in the following code snippet.
Code: Select all
string fileName = "insertTableToExcel.xls";
string downloadsFolder = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "\\Downloads\\" + fileName;

By modifying your code to use the downloadsFolder variable as the save path, the file will be saved in the downloads folder of the current user, which is accessible to all users.Please note that it's important to ensure that the necessary permissions are set for the application to write to the downloads folder.

For your second issue, kindly note that your license has expired on August 16, 2020, you need to renew your license subscription to use the latest Spire.Office Platinum(Hotfix) Version:8.6.0. If there is still any doubt, just feel free to contact us.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 200
Joined: Mon Dec 27, 2021 2:23 am

Wed Jul 05, 2023 6:04 pm

Thanks for the reply.
The downloads puts the downloaded file directly into the Downloads folder without any notification, but I need the user to see the notification on their screen indicating that the file has been downloaded to the Downloads folder.
Please see attached screenshot.
Attachments
downloads notification.PNG
Sample expected notifcation
downloads notification.PNG (72.42 KiB) Viewed 520 times

FrancisIzu
 
Posts: 4
Joined: Fri Jun 23, 2023 7:19 pm

Thu Jul 06, 2023 3:38 pm

Hello,

Thanks for your reply.
Do you want to inquire about how to enable customers to directly download the generated Excel files in the browser? If so, I'm afraid this question might be unrelated to our product. As a suggestion, you may consider searching for relevant solutions on Google. If there is any misunderstanding, please provide us with the following information for further investigation or a simplified project that can directly reproduce your issue. Thank you in advance.
1) Your test environment, such as operating system information (e.g. Windows 10, 64-bit) and locale Settings (e.g. China, Chinese);
2) Your application type, such as console application (. NET Framework 4.5).

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 200
Joined: Mon Dec 27, 2021 2:23 am

Thu Jul 06, 2023 6:37 pm

Hi William,
Noted. Just to clarify, I already had the code that drops the file in any folder of my choice. I needed SpireXLS just for the sake of having the notification when the file is downloaded. If SpireXLS does not activate notification when the file is downloaded, there would not be need for further assistance. I will look more into how that notification is generated by the OS during downloads.
Thank you so much!

FrancisIzu
 
Posts: 4
Joined: Fri Jun 23, 2023 7:19 pm

Sun Jul 09, 2023 2:20 pm

Hello,

Thanks for your reply.
Kindly note that our Spire.Xls does not support the function you mentioned. Hope you can investigate a satisfactory solution,and if you encounter any questions about our products in the future, please feel free to contact us.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 200
Joined: Mon Dec 27, 2021 2:23 am

Return to Spire.XLS