将txt文件导入数据集&执行公式&图 [英] Import txt file into Dataset & perform formulas & graphs

查看:70
本文介绍了将txt文件导入数据集&执行公式&图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何将包含数千个分隔数字的txt文件导入数据集,并对导入的数据应用不同的公式,类似于excel函数。例如,这是txt文件数据:



I would like to know how I could import a txt file that has thousands of delimited numbers into a dataset and apply different formulas on the imported data similar to how excel functions. For example this is the txt file data:

001
TEST1
21.03.2013
12:20:45
010
10000
00900
0500
4000
0100
0198
02845
01040
1
1
0
0
1
01
000.0
+01.1







公式应用于数字,返回值输入表格。返回数据也用于图表。



Excel可以轻松完成。如何将其合并到我的应用程序中?




Formulas are applied to the number and the return values are input into a form. The return data is also used to graph.

Excel does this easily. How do I incorporate this into my application?

推荐答案

循环文本文件并将值插入dataTable,然后使用LINQ或lambda表达式查询dataTable。我不明白上面的格式 - 它是每行的单个值,这个模式是否重复 - 重复之前有多少行 - 是解决如何解析它所需的所有问题。列用于字段类型,每个记录的字段数,行用于保存每列的值的记录。一旦解决了问题,我们就可以帮助表达式得到结果。
Loop thru the text file and insert values into a dataTable then query the dataTable with LINQ or lambda expressions. I don't understand the above format - it is a single value per line, does this pattern repeat - how many lines before repeating - are all questions you need to solve how to parse it. Columns are for the field types, number of fields per record and the rows are for the records that hold the values for each column. Once you get that solved we can help with the expression to get the results.


这篇关于将txt文件导入数据集&执行公式&图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆