الحصول على رقم الإصدار للتطبيق الذي أنشأ مستند Excel
Contents
[
Hide
]
غالباً ما تحتاج إلى معرفة رقم إصدار التطبيق الذي أنشأ مستند Microsoft Excel. يوفر Aspose.Cells for Python via .NET الخاصية Workbook.built_in_document_properties.version لهذا الغرض.
الكود النموذجي التالي يظهر استخدام خاصية Workbook.built_in_document_properties.version. يقوم بتحميل ملفات Excel التي تم إنشاؤها باستخدام Microsoft Excel 2003 و 2007 و 2010 و 2013 ويقوم بطباعة رقم الإصدار للتطبيق الذي أنشأ هذه المستندات في 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 | |
# Create a workbook reference | |
workbook = None | |
# Print the version number of Excel 2003 XLS file | |
workbook = Workbook("Excel2003.xls") | |
print("Excel 2003 XLS Version: " + workbook.built_in_document_properties.version) | |
# Print the version number of Excel 2007 XLS file | |
workbook = Workbook("Excel2007.xls") | |
print("Excel 2007 XLS Version: " + workbook.built_in_document_properties.version) | |
# Print the version number of Excel 2010 XLS file | |
workbook = Workbook("Excel2010.xls") | |
print("Excel 2010 XLS Version: " + workbook.built_in_document_properties.version) | |
# Print the version number of Excel 2013 XLS file | |
workbook = Workbook("Excel2013.xls") | |
print("Excel 2013 XLS Version: " + workbook.built_in_document_properties.version) | |
# Print the version number of Excel 2007 XLSX file | |
workbook = Workbook("Excel2007.xlsx") | |
print("Excel 2007 XLSX Version: " + workbook.built_in_document_properties.version) | |
# Print the version number of Excel 2010 XLSX file | |
workbook = Workbook("Excel2010.xlsx") | |
print("Excel 2010 XLSX Version: " + workbook.built_in_document_properties.version) | |
# Print the version number of Excel 2013 XLSX file | |
workbook = Workbook("Excel2013.xlsx") | |
print("Excel 2013 XLSX Version: " + workbook.built_in_document_properties.version) |