OpenFileDialog ofd = new OpenFileDialog();
System.IO.Stream s;
ofd.Filter = "text files (*.txt)|*.txt";
ofd.FilterIndex = 2;
ofd.RestoreDirectory = true;
if (ofd.ShowDialog() == DialogResult.OK)
{
s = ofd.FileName;
fpSpread1.ActiveSheet.LoadTextFile(s, true);
}
Dim s As String
Dim ofd As New OpenFileDialog()
ofd.Filter = "text files (*.txt)|*.txt"
ofd.FilterIndex = 2
ofd.RestoreDirectory = True
If ofd.ShowDialog() = DialogResult.OK Then
s = ofd.FileName
FpSpread1.ActiveSheet.LoadTextFile(s, True)
End If