Issues while inserting attachments in excel worksheet

Also, this 21.1 version working in my POC but when I integrate this code in my real project getting the attached error, I have manually copied to bin folder of the solution but still getting the same issue…please find attached screen shot for reference.Aspose Error.PNG (21.3 KB)

@srinivasaraju.b,
Could you please try to add the System.Text.Encoding.CodePages manually and see if issue is resolved or not?

@ahsaniqbalsidiqui,
I have added the reference directly to the project instead of nuget, still having the same issue.

@srinivasaraju.b,
Please note, latest version of Aspose.Cells for NetStandard20 assembly (Aspose.Cells v21.1) also requires to install System.Drawing.Common (version >= 5.0.0) and System.Text.Encoding.CodePages (version >= 5.0.0) APIs to make it work. So, you should install these APIs manually (you may get these namespaces from nuget). Alternatively, try installing the new version (Aspose.Cells for .NET v21.1) from NuGet repos. (if possible) as when you get/install Aspose.Cells from nuget repos., these additional dependencies (APIs) will be installed automatically.

If this still does not work after you have installed/referenced System.Text.Encoding.CodePages in your .NetCore program, you may try to call the following method to register encoding Provider, see the line of code which you need to add the line at the start:
i.e.,
System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
(we also provide “CellsHelper.InitForDotNetCore()” method, and you may also call it first for all .NetCore initializations).

Once all the above options are tried and issue is not resolved, share your sample solution with us for testing.

Hi @srinivasaraju.b
About the unknown icon, we will fix it on next version.
About the missing nuget DLL, please confirm your real project environment, is it an Azure function application?
In previous tests, we found that:
DLLs referenced by NuGet work fine in Azure web application, but will fail in Azure function application, the error is DLL missing.
It seems that, DLLs referenced by NuGet could not be deployed to Azure function application.

Hi @leoluo,
Yes, it is Azure function application. How you guys fixed that issue in previous tests.

Hi @ahsaniqbalsidiqui,
Let me try these options, thanks

Hi @ahsaniqbalsidiqui,
I have tried using the below methods,
System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
(we also provide “CellsHelper.InitForDotNetCore()” method, and you may also call it first for all .NetCore initializations).

but getting the same bellow issue.

“COuld not load file or assembly ''System.text.encoding.codepages”…

Thanks,

@srinivasaraju.b
Please try the latest fix 21.1.1. JPEG, ZIP, MSG can inserted as embedded object with objOle.SetEmbeddedObject() method.

Aspose.Cells21.1.1 For .NetStandard20.Zip

@simon.zhao, with fix 21.1.0 could able to insert the JPEG, ZIP, MSG but problem is having issue with dependent dll “System.text.encoding.codepages”.

Hi @srinivasaraju.b
Please refer to this link:

A post was split to a new topic: Exception raised while adding the latest NuGet package and compiling Azure Function

I create an empty Azure Function APP, only reference “System.Text.Encoding.CodePages”, try to call:

System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);

When I set “System.Text.Encoding.CodePages” version to 4.7.0, this Function app run without any exception, but if the version set to 5.0.0, will fail.
To deal with this, we decided to revert the NuGet package version referenced by Aspose.Cells to the previous version:

System.Drawing.Common 5.0.0 - > 4.7.0
System.Text.Encoding.CodePages 5.0.0 - > 4.7.0

New fix will publish soon.

Hi @srinivasaraju.b
we revert the NuGet package version referenced by Aspose.Cells to the previous version:
System.Drawing.Common 5.0.0 - > 4.7.0
System.Text.Encoding.CodePages 5.0.0 - > 4.7.0

Please try the latest fix 21.1.4.
Aspose.Cells21.1.4 For .Net2_AuthenticodeSigned.Zip (5.5 MB)
Aspose.Cells21.1.4 For .Net4.0.Zip (5.5 MB)
Aspose.Cells21.1.4 For .NetStandard20.Zip (5.5 MB)

Hi @leoluo,
Thanks you for the update, we will try this solution and let you know soon.

Thanks,