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.

Tue Feb 23, 2021 10:58 am

Hello!

I'm using Spire.XLS for Excel file creation from within my Xamarin Forms application.

On Android everything works as expected, but I have a problem when using the Library on iOS:

When setting the Color property of a CellStyle the following exception gets thrown:
Code: Select all
Method not found: void Spire.Xls.CellStyleObject.set_Color(System.Drawing.Color)


I set the color as following:
Code: Select all
measurementWorksheet[1, column + 1].Style.Color = Color.FromArgb(0, 74, 136);


I use the latest Spire.XLS library (11.2.3) and the iOS app targets SDK 14.4.
The app targets Xamarin Forms 5.0.0.1931.
The linker options are set to "Don't Link"


Can you help me with that issue?


Best regards
Michael

mikopresens
 
Posts: 2
Joined: Tue Feb 02, 2021 9:44 am

Wed Feb 24, 2021 10:34 am

Hello Michael,

Thanks for your inquiry.
Which folder does the dlls referenced by your project come from? If you are not using the dlls in the folder “Xamarin.iOS” (as shown below), please remove all the dlls first, and then re-add them from this folder.
screenshot.png
screenshot.png (34.45 KiB) Viewed 743 times

If the issue still occurs after trying, please provide us with your project for further investigation. Kindly note that our forum has a size limit when uploading files, you could upload your project to the DropBox or OneDrive and then share the download link with us. Thanks in advance.

Besides, regarding “iOS app targets SDK 14.4” you mentioned, do you mean the target ISO version that needs to be selected when creating the project?

Sincerely,
Brian
E-iceblue support team
User avatar

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

Wed Feb 24, 2021 8:49 pm

Hello Brian,

I have found a workaround for now (defining the cell color as a predefined cell style in the excel template I use to generate the file I need to generate).

Regarding your question if I refer to the correct dlls, yes I can confirm that my iOS project refers to the correct dlls provided by the NuGet package

I can also provide you with a solution you can use to recreate the issue but I'm not allowed to post links here.
What would be the best option to send you a link to my github repository?


Regards
Michael

mikopresens
 
Posts: 2
Joined: Tue Feb 02, 2021 9:44 am

Thu Feb 25, 2021 9:58 am

Hello Michael,

Thanks for your feedback.

You could send the link to us (support@e-iceblue.com) via email. Thanks in advance for your sharing.

Sincerely,
Brian
E-iceblue support team
User avatar

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

Return to Spire.XLS