1 I'm doing some reading recently Excel File some operations , encounter winform load Excel file
2 To start with FileInfo.GetFiles("*.*") Read it all , You can't screen Excel
3 see Msdn Find out What this method does ：
"*.abc" Will return file with extension of.abc,.abcd,.abcde,.abcdef.
"*.abcd" Only return files with extension of.abcd.
"*.abcde" Only return files with extension of.abcde.
"*.abcdef" Only return files with extension of.abcdef.
DirectoryInfo directoryInfo = new DirectoryInfo(pathDir);
FileInfo fileInfos = directoryInfo.GetFiles("*.xls", SearchOption.AllDirectories);
such “.xls” and “.xlsx” All the documents can be screened out ...