We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Failed to convert xlsx file to tiff on CentOS

Hi,
I’m using latest version of Aspose Cells 21.11 to convert some xlsx file to tiff image format on Linux, but they are always throw exception and stack trace like this:
Exception : Not implemented.
Stack trace:

at Aspose.Cells.Workbook.Save(String fileName, SaveOptions saveOptions)
at Aspose.Cells.Workbook.Save(String fileName, SaveFormat saveFormat)

Sample code:

try
{
using(var workbook = new Aspose.Cells.Workbook(inFile))
{
workbook.Save(outFile, SaveFormat.TIFF);
}
}catch(Exception e)
{}

Here is some files that failed to convert : sample.zip (21.8 KB)

Please help me check this.
Thank you.

@dunghnguyen,

Please make sure that you are using latest version/fix of the APIs. Could you please share complete details of error description and stack trace produced on CentOS. We will check your issue soon.

@Amjad_Sahi,
Yes, I’m using version 21.11.0.0 of Aspose Cells for .NET5. The exception message and exception stack trace are like the post. The running machine is CentOS 7.

@dunghnguyen,

Could you try using .Aspose.Cells.Dll for NET Standard 2.0 if it makes any difference?

@Amjad_Sahi,
I tried but it still meets the same error.

@dunghnguyen,

We were able to reproduce the issue as you mentioned on CentOS. We found If the TIFF contains more than one page, conversion will fail. We have logged a ticket with an id “CELLSNETCORE-295” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.

Hi @dunghnguyen
We investigated this issue, found system.drawing.common lib did not implement this method under Linux: Bitmap.SaveAdd

We will solve the problem of exception first, make the first page of tiff content available for generation (The next patch takes effect).

But, about the problem of multiple pages tiff, we need to implement the Graphics Library in Linux ourself, which required more time.

Thanks for quick explanation, I understood the situation.
Please keep me posted if any updates.

@dunghnguyen,

Sure, we will keep you posted on the updates when available.

Hi @dunghnguyen
Please use Aspose.Cells21.11.4,
We solve the problem of exception, and make the first page of tiff content available for generation.

Aspose.Cells21.11.4 For .Net5.0.Zip (5.5 MB)
Aspose.Cells21.11.4 For .NetStandard20.Zip (5.6 MB)

Since this is a patched version, you may need to manually reference the following package from nuget:
“System.Drawing.Common, 4.7.0”
“System.Text.Encoding.CodePages, 4.7.0”

1 Like

And, about the system.drawing.common lib is not perfect in Linux , resulting in problems (not only for Bitmap.SaveAdd)
We have discussed and evaluated this, considerd that Microsoft’s willingness to maintain it is very weak:

We may be about to abandon system.drawing.common in linux, and do the implementation of the new graphics library, but this may take more time.

1 Like

@leoluo,
Thank you for your quick reply. I understood the issue here.