First of all, we need to place a opendialogbox control on our form.
string filename;
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.Filter = "*.xls | *.xlsx";
openFileDialog1.ShowDialog();
filename = openFileDialog1.FileName.ToString();
string filename;
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.Filter = "*.xls | *.xlsx";
openFileDialog1.ShowDialog();
filename = openFileDialog1.FileName.ToString();
No comments:
Post a Comment