Xls file version


How can I read excel file version (Excel2000, ExcelXP, Excel97 etc…)?

I guess something like
Aspose.Excel.Excel xls = new Aspose.Excel.Excel(lic);
Aspose.FileFormatType frmt = xls.Version;//???


You can directly open different versions of excel file with Excel.Open method. Aspose.Excel can automatically distinguish the xls version.

Aspose.Excel.Excel xls = new Aspose.Excel.Excel(lic);

That’s enough.

By the way, now we recommend to use Excel.SetLicense method to set license.

Yes, Excel.Open() can open any version of excel file.
But I want to know what version exactly did he open.

Now Aspose.Excel can open excel file of Excel97, Excel2000, ExcelXP, Excel2003. Some file of Excel95 format is also can be opened.

Aspose.Excel doesn’t care about the version of Excel file for difference among Excel97, Excel2000, ExcelXP, Excel2003 is small.

Aspose.Cells is introduced which has replaced Aspose.Excel. This new product Aspose.Cells is much advanced in terms of performance and features. It supports all the latest versions of MS Excel. Using this new product you can detect the format of the file as shown in the following sample code:

Workbook workbook = new Workbook(FileFormatType.Xlsx);
//Detect file format
FileFormatInfo info = FileFormatUtil.DetectFileFormat("Book1.abc");

//Gets the detected load format
Console.WriteLine("The spreadsheet format is: " + FileFormatUtil.LoadFormatToExtension(info.LoadFormat));

Following is the article which can be used to get more information about it:
How to detect a file format and check if the file is encrypted

Here is the link to the latest version of this new product for trials:
Aspose.Cells for .NET (Latest Version)

Get a complete runnable solution for testing a variety of features of this new product here.