Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Tue Apr 30, 2019 5:56 am

I am using spire.office. It is converting data from excel to pdf successfully but not from the document or rtf file. It is showing the following error at
Code: Select all
Document doc = new Document(filepath + ".docx", Spire.Doc.FileFormat.Docx);
.
Could not load type 'spr᝚' from assembly 'Spire.Doc, Version=7.1.13.41046, Culture=neutral, PublicKeyToken=663f351905198cb3' because it attempts to implement a class as an interface.

Please check it and gives some advice. Thanks in advance
Code: Select all
File.WriteAllText(filepath + ".rtf", fileText);
                Document doc = new Document(filepath + ".docx", Spire.Doc.FileFormat.Docx);
                //doc.LoadFromFile(filepath + ".docx",Spire.Doc.FileFormat.Docx);
                doc.SaveToFile(filepath + ".pdf");

sudipmca
 
Posts: 2
Joined: Tue Apr 30, 2019 5:42 am

Tue Apr 30, 2019 8:34 am

Hi,

Thank you for contacting us.
Please check whether the Spire.Pdf.dll and Spire.Doc.dll you added are from the same package or not. I suggest you remove all dlls related to our product in your project, and then re-add the corresponding dlls from Spire.Office package. If there is any question, welcome to write back.

Sincerely,
Nancy
E-iceblue support team
User avatar

nancy.yang
 
Posts: 184
Joined: Wed Apr 03, 2019 2:33 am

Tue Apr 30, 2019 8:42 am

Thanks, Nancy for the sincere reply. We will follow your method and let you know.

sudipmca
 
Posts: 2
Joined: Tue Apr 30, 2019 5:42 am

Wed May 01, 2019 1:16 am

Hi,

Greetings from E-iceblue.
Has your issue been resolved? Thanks in advance for your feedback and time.

Sincerely,
Nancy
E-iceblue team
User avatar

nancy.yang
 
Posts: 184
Joined: Wed Apr 03, 2019 2:33 am

Mon Oct 07, 2019 4:24 pm

Hi,

I have the same issue

Could not load type 'spr\u175a' from assembly 'Spire.Doc, Version=7.1.13.41046, Culture=neutral, PublicKeyToken=663f351905198cb3' because it attempts to implement a class as an interface.":"spr\u175a"

Thanks.

ian@eits.dev
 
Posts: 1
Joined: Tue Jun 04, 2019 11:51 am

Tue Oct 08, 2019 3:50 am

Hi,

Thanks for your inquiry.
Please remove all the Spire dlls in your project then clean and build the project, finally reference the dlls again from the same folder and try again.
If the issue still exists, to help us better investigate it, please offer us a sample project which could reproduce your issue directly. You could upload it here or send us(support@e-iceblue.com) via email.

Best wishes,
Amber
E-iceblue support team
User avatar

Amber.Gu
 
Posts: 525
Joined: Tue Jun 04, 2019 3:16 am

Tue Dec 03, 2019 9:00 am

Hi,

Greetings from E-iceblue.
How's your issue going? Could you please give us some feedback at your convenience?

Best wishes,
Amber
E-iceblue support team
User avatar

Amber.Gu
 
Posts: 525
Joined: Tue Jun 04, 2019 3:16 am

Mon Mar 22, 2021 9:06 am

This issue happend with me too. Reload libraries do not helps.
But I use different spire libraries (doc and xls) with different projects and this projects used in one big solution.
Problem with this error was solved when I remove other libraries and continue use only one in whole solution.

It is necessary to manually delete all references to spire in .config files and then install it again in only one project.

ioanngrozny
 
Posts: 1
Joined: Mon Mar 22, 2021 9:01 am

Mon Mar 22, 2021 9:40 am

Hello,

Thanks for your sharing.

Yes, since each of our products is independent and incompatible, if you want to use multiple components of Spire in a same project, you need to download the Spire.Office to avoid incompatibility issues.

If there are any other questions, just feel free to contact us.

Sincerely,
Brian
E-iceblue support team
User avatar

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

Return to Spire.Doc