我想把存储在Oracle数据库中的文本文件解析出来显示在界面上的DataGridView控件中,文本文件的内容如下,请大家帮忙看看,谢谢!
EportSoft Tube ... X Y Z R
33.000
0.000 0.000 0.000 0.000
40.000 -0.000 0.000 55.000
145.001 150.208 0.000 0.000
#eof
EportSoft Tube ... X Y Z R
33.000
0.000 0.000 0.000 0.000
40.000 -0.000 0.000 55.000
145.001 150.208 0.000 0.000
#eof
解决方案 »
- 求救 使用 twainpro 如何获得扫描仪的序列号
- DataGirdView绑定问题
- 找不到类型或命名空间名称“PrintOptions”
- Remoting难题:性能问题
- 如果想找一些开源程序,请问应该在哪里找?
- ToolBar问题 --要怎么才能改变ToolBar按钮的大小
- ConfigurationSettings.AppSettings["ConnectionString"]; 是 什么意思?
- 关于DataGrid的几个问题,高手请指教
- 无名的json怎么解析?
- 谁有 Devexpress XtraGrid Suite 2的序列号,帮个忙!
- 同样的dt.columns.add(),却不同结果
- textbox的backcolor设置问题
String.Split 来做把.
using (TextFieldParser myReader = new TextFieldParser(filePath))
{
string[] currentRow;
this.dataGridView1.Rows.Clear();
while (!myReader.EndOfData)
{
try
{ currentRow = myReader.ReadFields();
foreach (string currentfield in currentRow)
{
string[] str = currentfield.Split(" ");//错误在这里 改成单引号也不行的
this.dataGridView1.Rows.Add(str);
}
}
catch (MalformedLineException ex)
{
MessageBox.Show("行 " + ex.Message + " 是无效的。略过。");
} }
}