I have attached a template excel file and the test code.
It looks like the frequency formula is not calculated.
Sample code:
==================================
import java.io.FileInputStream;
import java.io.IOException;
import com.aspose.cells.AsposeLicenseException;
import com.aspose.cells.Cells;
import com.aspose.cells.CellsHelper;
import com.aspose.cells.License;
import com.aspose.cells.Workbook;
public class Frequency {
public static void main(String[] args) throws IOException, AsposeLicenseException {
License lic = new License();
lic.setLicense(new FileInputStream(“lib/Aspose.Cells.lic”));
System.out.println("Aspose version : " + CellsHelper.getReleaseVersion());
Workbook workbook = new Workbook();
workbook.open(“Excel/Frequency.xls”);
Cells cells = workbook.getWorksheets().getSheet(“Frequency”).getCells();
cells.getCell(“A3”).setValue(45);
cells.getCell(“A4”).setValue(45);
workbook.calculateFormula();
System.out.println("C3: " + cells.getCell(“C3”).getValue() + “\t (expected 0)”);
System.out.println("C4: " + cells.getCell(“C4”).getValue() + “\t (expected 2)”);
cells.getCell(“A3”).setValue(45);
cells.getCell(“A4”).setValue(30);
workbook.calculateFormula();
System.out.println("C3: " + cells.getCell(“C3”).getValue() + “\t (expected 1)”);
System.out.println("C4: " + cells.getCell(“C4”).getValue() + “\t (expected 1)”);
}
}
Hi,
Thank you for considering Aspose.
I am afraid, “Frequency” function is not supported in Aspose.Cells for Java. I have added your requirement into our issue tracking system with issue id: CELLSJAVA-12062. We will look into it and see if we can support it soon as per your requirement.
Also, you may check the list of supported formulas & functions from the following link for reference:
Thank You & Best Regards,
Hi,
Please try this fix at https://forum.aspose.com/t/67707, we have supported to calculate FREQUENCY formula.