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 12, 2025 2:17 pm

Hello,

Is there any version of Spire.XLS that can be used on linux using .net 8 ?

I see properties that depends on system.drawing (Color) wich is no longer supported on .net / linux :
Exemple : Chart chart

chart.Series[0].Format.LineProperties.Color type is System.Drawing.Color

How I can set this property ?

fpeuchot
 
Posts: 3
Joined: Thu May 06, 2021 1:19 pm

Thu Mar 13, 2025 6:09 am

Hello,

Thanks for your inquiry.
Please be aware that starting from .NET 6, System.Drawing.Common is not supported by default on Linux platforms because it relies on Windows' GDI+ API, and the implementation on Linux (such as libgdiplus) has performance and compatibility issues. However, System.Drawing.Color, as a pure data structure (representing color values), does not rely on GDI+ or the underlying operating system graphics library, so it can still be used normally on Linux. If you need to use Spire.XLS to process Excel files in a .NET 8 Linux environment, please search and install "Spire.XLSfor.NETStandard" directly via nuget. This version uses SkiaSharp instead of System.Drawing.Common. At the same time, you also need to install "SkiaSharp.NativeAssets.Linux.NoDependencies 2.80.0" to ensure that SkiaSharp runs properly on Linux.
If you have any other questions, please feel free to write to back.

Sincerely,
William
E-iceblue support team
User avatar

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

Thu Mar 13, 2025 10:12 am

Hello,

Thanks for your answer.

I try this, but I encounter this exception now :
System.InvalidOperationException: Cannot found font installed on the system.
at spr興.潘(String A_0, sprꍭ A_1, String A_2)
at spr奨.ꂓ(String A_0, sprꍭ A_1, String A_2)
at spr奨.ꂓ(String A_0, Single A_1, sprꍭ A_2)
at spr⳹.ꂓ(spr쯨 A_0)
at spr⳹.ꅮ(spr玂 A_0)
at spr⳹.ꃜ(spr玂 A_0, Stream A_1, spr넝 A_2)
at spr⳹.ꉉ(spr玂 A_0)
at spr玂.ꃜ(ConverterSetting A_0)
at spr玂.ꂓ(ConverterSetting A_0)
at Spire.Xls.Core.Spreadsheet.XlsWorkbook.ꂓ(Worksheet A_0, Int32 A_1, ConverterSetting A_2)
at Spire.Xls.Core.Spreadsheet.XlsWorkbook.SaveChartAsImage(Worksheet worksheet, Int32 chartIndex, ConverterSetting imageOrPrintOptions)
at Spire.Xls.Workbook.SaveChartAsImage(Worksheet worksheet, Int32 chartIndex)

That's strange, I don't specify any font and use workbook.CreateEmptySheets(1); to create a new excel file.
Any idea ?

Sincerely,
Kevin

fpeuchot
 
Posts: 3
Joined: Thu May 06, 2021 1:19 pm

Fri Mar 14, 2025 2:34 am

Hello,

Thank you for your email.
Currently, our product requires fetching fonts from the server when processing documents. If your server does not have any fonts installed, this issue will occur. Our development team will investigate further to prevent such anomalies in the future. I have logged this optimization task under SPIREXLS-5749 and will notify you once the updated version is available.

In the meantime, you can avoid this issue by installing some commonly used fonts on your linux server. If you have any further questions, just feel free to contact.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1510
Joined: Wed Apr 25, 2018 3:20 am

Fri Mar 14, 2025 8:13 am

Hello,

Thanks, it works by installing mscorefonts.

Regards

fpeuchot
 
Posts: 3
Joined: Thu May 06, 2021 1:19 pm

Fri Mar 14, 2025 8:21 am

Hello,

Thank you very much for your prompt feedback.
Regarding SPIREXLS-5749, we will notify you once the optimized version is released.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1510
Joined: Wed Apr 25, 2018 3:20 am

Mon Apr 14, 2025 3:22 am

Hello,

We are glad to inform you that our latest version(Spire.XLS Pack(Hotfix) Version:15.4.0) has made adjustments to the previously recorded SPIREXLS-5749 issue. Currently it will no longer throw 'Invalid Operation Exception: Cannot found font installed on the system' when there is no font in the system.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1510
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.XLS