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", ",", "", System.Text.Encoding.ASCII);
}
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), ",", "", System.Text.Encoding.ASCII)
End If