.. highlightlang:: us .. index:: IsFileExcel .. _isfileexcel: IsFileExcel =========== .. us.tag IsFileExcel ENGLISH FILE_MISC :ref:`IsFileExcel` checks if the given file is an Excel file (:file:`.xls`, :file:`.xlsx`, ...). .. function:: nVersion = IsFileExcel(ssFileName) .. us.return **Return Value** This function returns the version number multiplied by 10, or 0 if the file is not an Excel file or cannot be opened. .. us.params **Parameters** .. uparam:: ssFileName *ssFileName* is the file name. .. us.example **Example** :: if (IsFileExcel("c:/data/test.xls")) { MessageBox("test.xls is an Excel File"); } else { MessageBox("test.xls is not an Excel File"); } .. seealso:: :ref:`overview-excel-files`, :ref:`ExcelRead`, :ref:`ExcelWrite`, :ref:`ExcelGetSheetNames` :sub:`id-328338`