عرض الصيغ بدلاً من القيم في ورقة العمل
Contents
[
Hide
]
من الممكن عرض الصيغ بدلاً من القيم الحسابية في Microsoft Excel باستخدام خيار عرض الصيغ من شريط الصيغ. عند عرض الصيغ، يعرض Microsoft Excel الصيغ في ورقة العمل. يمكنك تحقيق نفس الشيء باستخدام Aspose.Cells لـ Python via .NET.
توفر Aspose.Cells لـ Python via .NET خاصية Worksheet.show_formulas. قم بضبطها على true لتعيين Excel لعرض الصيغ.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from aspose.cells import Workbook | |
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET | |
# The path to the documents directory. | |
dataDir = RunExamples.GetDataDir(".") | |
filePath = dataDir + "source.xlsx" | |
# Load the source workbook | |
workbook = Workbook(filePath) | |
# Access the first worksheet | |
worksheet = workbook.worksheets[0] | |
# Show formulas of the worksheet | |
worksheet.show_formulas = True | |
# Save the workbook | |
workbook.save(dataDir + ".out.xlsx") |