dear support,
nw with attachment
Hi,
Thanks for your posting and using Aspose.Cells.
I have run your program and got the attached output pdf which looks fine to me. Do you see any problem with it, please explain it in detail so that we could investigate this issue further. Let us know where ICustomFunction is failing to fulfill your requirements.
thnaks for looking into it.
Hi Guido,
Thanks for your explanation and using Aspose.Cells.
I have earlier attached your actual pdf. Could you please manually create your expected pdf? You can create it in some Excel file manually and save it to pdf. By comparing the actual and expected pdf, we will be in better position to understand your requirements fully and implement this feature in our future versions.
Thanks for you cooperation.
please find attached a word document with that explains the suggested functionality.
Hi Guido,
Thanks for explanation and using Aspose.Cells.
We have logged your requirement as a New Feature request in our database. We will look into it and support this feature. Once the feature is supported or we have some other update for you, we will let you know asap.
This issue has been logged as
- CELLSNET-43703 - ICustomFunction - returning a range instead of a single cell
Hi,
Thanks for using Aspose.Cells.
Please download and try the latest fix: Aspose.Cells
for .NET v8.4.2.7 and let us know your feedback.
With latest fix and setting the custom function as array formula, you can get the expected result:
C#
Workbook wb = new Workbook();
Cells cells = wb.Worksheets[0].Cells;
Cell cell = cells[0, 0];
cell.SetArrayFormula(“=MYFUNC()”, 2, 2);
Style style = cell.GetStyle();
style.Number = 14;
cell.SetStyle(style);
CalculationOptions copt = new CalculationOptions();
copt.CustomFunction = new CustomFunctionStaticValue();
wb.CalculateFormula(copt);
…
class CustomFunctionStaticValue : ICustomFunction
{
public object CalculateCustomFunction(string functionName, ArrayList paramsList, ArrayList contextObjects)
{
return new object[][] {
new object[]{new DateTime(2015, 6, 12, 10, 6, 30), 2},
new object[]{3.0, “Test”}
};
}
}
Hi,
Thanks for your posting and using Aspose.Cells.
I have tested the above sample C# code with the latest version: Aspose.Cells
for .NET v8.4.2.7 and it worked fine. I have attached the runnable sample C# console application project, please download and run it at your end.
I have also attached the output excel file and the output pdf file generated by the sample project for your reference.
We will look into it further and provide the equivalent VB.NET
code soon.
Hi,
Thanks for using Aspose.Cells.
I have converted the TestProject.zip C# code into VB.NET
code but it is not working. Here is the code for VB.NET
. I have attached the VB.NET
project for a reference.
I have reopened this issue for product team investigation and logged a comment. We will look into it and provide you a correct code or if there is some bug we will fix it. Once, there is some news for you, we will let you know asap.
VB.NET
Public Class CustomFunctionStaticValue
Implements Aspose.Cells.ICustomFunction
Function CalculateCustomFunction(ByVal functionName As String, ByValparamsList As System.Collections.ArrayList, ByVal contextObjects AsSystem.Collections.ArrayList) As Object _
Implements Aspose.Cells.ICustomFunction.CalculateCustomFunction
Dim o() As Object = New Object() {New Object() {New DateTime(2015, 6, 12, 10, 6, 30), 2}, New Object() {3.0, “Test”}}
Return o
End Function
End Class
hello support,
Hi Guido,
Thanks for your posting and using Aspose.Cells.
There is no update for you at this momement. Please spare us some time. Once there is some update for you, we will let you know asap.
Hi,
Thanks for using Aspose.Cells.
Please download and try the latest fix: Aspose.Cells for .NET v8.5.0.1 and let us know your feedback.
The issues you have found earlier (filed as CELLSNET-43703) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.