Get the Version Number of the Application that Created the Excel Document
Contents
[
Hide
]
Often you need to know the version number of the application that created a Microsoft Excel document. Aspose.Cells provides the Workbook.BuiltInDocumentProperties.Version property for this purpose.
The following sample code demonstrates the use of the Workbook.BuiltInDocumentProperties.Version property. It loads Excel files created with Microsoft Excel 2003, 2007, 2010 and 2013 and prints the version number of the application that created these Excel documents.
This file contains 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
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// Create a workbook reference | |
Workbook workbook = null; | |
// Print the version number of Excel 2003 XLS file | |
workbook = new Workbook("Excel2003.xls"); | |
Console.WriteLine("Excel 2003 XLS Version: " + workbook.BuiltInDocumentProperties.Version); | |
// Print the version number of Excel 2007 XLS file | |
workbook = new Workbook("Excel2007.xls"); | |
Console.WriteLine("Excel 2007 XLS Version: " + workbook.BuiltInDocumentProperties.Version); | |
// Print the version number of Excel 2010 XLS file | |
workbook = new Workbook("Excel2010.xls"); | |
Console.WriteLine("Excel 2010 XLS Version: " + workbook.BuiltInDocumentProperties.Version); | |
// Print the version number of Excel 2013 XLS file | |
workbook = new Workbook("Excel2013.xls"); | |
Console.WriteLine("Excel 2013 XLS Version: " + workbook.BuiltInDocumentProperties.Version); | |
// Print the version number of Excel 2007 XLSX file | |
workbook = new Workbook("Excel2007.xlsx"); | |
Console.WriteLine("Excel 2007 XLSX Version: " + workbook.BuiltInDocumentProperties.Version); | |
// Print the version number of Excel 2010 XLSX file | |
workbook = new Workbook("Excel2010.xlsx"); | |
Console.WriteLine("Excel 2010 XLSX Version: " + workbook.BuiltInDocumentProperties.Version); | |
// Print the version number of Excel 2013 XLSX file | |
workbook = new Workbook("Excel2013.xlsx"); | |
Console.WriteLine("Excel 2013 XLSX Version: " + workbook.BuiltInDocumentProperties.Version); |