We are using Aspose.Cells for .Net 19.6. Our requirement is to export range of cells in a Worksheet to an image (so far we have tried JPEG). Our backend is implemented using Azure Functions (serverless compute service in Azure Cloud). For security reasons, the sandbox that Azure Functions use is prohibited from accessing certain parts from the Windows API, specifically the part which deals with rendering graphics. The unfortunate implication of this is that software running in Azure Functions has no access to the System.Drawing library, which in turn Aspose.cells uses to render snapshots of Excel sheets.
Can you please suggest how can we overcome or work around this limitation? Is there other output image format (e.g. TIFF, PNG?) that doesn’t require access to the System.Drawing library?
Unfortunately, the suggestion has not helped. We now got to know that the root cause of the issue is that Aspose.Cells product uses System.Drawing classes. That it’s failing inside Microsoft Azure Functions (v2 using .NET Core) with the following error - “System.Drawing is not supported on this platform” - Azure Functions v2 works in sandbox, not in .NET Core CLR. Due to the sandbox limitations no code can be run which uses System.Drawing.
Other users experience the same issues with other Aspose products - see below. That is very hindering, as many organizations are in the process of migrating there applications to Cloud, in many cases new applications are build in Cloud only, following Cloud first approach. In this case, this capability can be a decisive factor to go in favor of other product - e.g. Syncfusion, which doesn’t utilize System.Drawing classes, and hence doesn’t have the same issue.
Does anyone know whether Aspoce.Cells will also be switched to a new graphics library with PDFNET-45556? What is the ETA?
@Volo,
Thanks for details.
We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.
This issue has been logged as
CELLSNET-46974 - Worksheet to JPEG issue in Azure Functions v2
We have done a lot of tests for your issue on Azure and found that Azure already supports the System.Drawing.Common Graphics library, the difficulty described in this list should no longer exist. The Aspose.Cells library is currently available on Azure. As for the problem of switching the graphics library, it is too big and complicated task which will be addressed in details in future.