The OpenFileDialog control has the property Multiselect
that will allow you to select multiple files in the same dialog.
openFileDialog1.Filter = "Excel files|*.xlsx|All files|*.*";
openFileDialog1.Multiselect = true;
Then later you can use the property Filenames
(instead of Filename
) to retrieve your files:
foreach (string filePath in openFileDialog1.FileNames)
{
// ...
}
Check MSDN for more info.
4
solved How to open many excel file and open them in DataGridView