OpenFileDialog ofd = new OpenFileDialog();
string 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, FarPoint.Win.Spread.Model.IncludeHeaders.BothCustomOnly, "\n", ",", "");
}
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, FarPoint.Win.Spread.Model.IncludeHeaders.BothCustomOnly, Chr(10), ",", "")
End If