only open excel file
-
hi, i want to open only excel file using OpenFileDialog box need help. here is my code which open any file from local drive. private void button1_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); openFileDialog1.ShowDialog(); System.Diagnostics.Process.Start(openFileDialog1.FileName, "Fileselected"); }
-
hi, i want to open only excel file using OpenFileDialog box need help. here is my code which open any file from local drive. private void button1_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); openFileDialog1.ShowDialog(); System.Diagnostics.Process.Start(openFileDialog1.FileName, "Fileselected"); }
Apply filter to OpenFileDialog OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = "Excel|*.xls"; ofd.ShowDialog(); System.Diagnostics.Process.Start(ofd.FileName, "Fileselected");
-
Apply filter to OpenFileDialog OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = "Excel|*.xls"; ofd.ShowDialog(); System.Diagnostics.Process.Start(ofd.FileName, "Fileselected");
is there any method to get entiered file string in text box from OpenFileDialog box
-
is there any method to get entiered file string in text box from OpenFileDialog box
No, only the full path. You can use Path.GetFileName to get the filename without the path in front of it
Christian Graus Driven to the arms of OSX by Vista.