Berechnung der Excel 2016 MINIFS und MAXIFS Funktionen mit C++

Mögliche Verwendungsszenarien

Microsoft Excel 2016 unterstützt MINIFS- und MAXIFS-Funktionen. Diese Funktionen werden in Excel 2013 oder früheren Versionen nicht unterstützt. Aspose.Cells unterstützt ebenfalls die Berechnung dieser Funktionen. Das folgende Screenshot zeigt die Verwendung dieser Funktionen. Lesen Sie die roten Kommentare im Screenshot, um zu erfahren, wie diese Funktionen funktionieren.

todo:image_alt_text

Berechnung der Excel 2016 MINIFS- und MAXIFS-Funktionen

Der folgende Beispielcode lädt die Beispiel-Excel-Datei und ruft die Methode Workbook.CalculateFormula() auf, um die Formelbechnung mit Aspose.Cells durchzuführen, und speichert dann die Ergebnisse in der Ausgabe-PDF.

#include <iostream>
#include "Aspose.Cells.h"
#include "Aspose.Cells/PdfSaveOptions.h"

using namespace Aspose::Cells;
using namespace Aspose::Cells::Rendering;

int main()
{
    Aspose::Cells::Startup();

    // For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-C

    // Source directory path
    U16String srcDir(u"..\\Data\\01_SourceDirectory\\");

    // Output directory path
    U16String outDir(u"..\\Data\\02_OutputDirectory\\");

    // Load your source workbook containing MINIFS and MAXIFS functions
    Workbook workbook(srcDir + u"sampleMINIFSAndMAXIFS.xlsx");

    // Perform Aspose.Cells formula calculation
    workbook.CalculateFormula();

    // Save the calculations result in pdf format
    PdfSaveOptions options;
    options.SetOnePagePerSheet(true);
    workbook.Save(outDir + u"outputMINIFSAndMAXIFS.pdf", options);

    std::cout << "PDF saved successfully!" << std::endl;

    Aspose::Cells::Cleanup();
}