1.多种类型可以一起选择
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Filter = "(excel文件)|*.xls;*.xlsx";
2.单类型选择
openFileDialog.Filter = ".xls|*.xls|.xlsx|*.xlsx";
3.所有类型
openFileDialog.Filter = "*|*";