Excel 2016のMINIFSとMAXIFS関数をPython.NETで計算する例
Contents
[
Hide
]
可能な使用シナリオ
Microsoft Excel 2016はMINIFSとMAXIFS関数をサポートしています。これらの関数はExcel 2013以前ではサポートされていません。Aspose.Cellsもこれらの関数の計算をサポートしています。以下のスクリーンショットはこれらの関数の使用例です。スクリーンショット内の赤いコメントを読んで、これらの関数の動作を理解してください。
Excel 2016のMINIFSおよびMAXIFS関数の計算
以下のサンプルコードは、サンプルExcelファイルを読み込み、workbook.calculate_formula()メソッドを呼び出して数式計算を実行し、その結果を出力PDFとして保存します。
import os
from aspose.cells import Workbook, PdfSaveOptions
# For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
current_dir = os.path.dirname(os.path.abspath(__file__))
source_dir = os.path.join(current_dir, "data")
output_dir = os.path.join(current_dir, "output")
# Load your source workbook containing MINIFS and MAXIFS functions
workbook = Workbook(os.path.join(source_dir, "sampleMINIFSAndMAXIFS.xlsx"))
# Perform Aspose.Cells formula calculation
workbook.calculate_formula()
# Save the calculations result in pdf format
options = PdfSaveOptions()
options.one_page_per_sheet = True
if not os.path.exists(output_dir):
os.makedirs(output_dir)
workbook.save(os.path.join(output_dir, "outputMINIFSAndMAXIFS.pdf"), options)