我如何...可以在C#中以excel格式从文本文件中提取数据? [英] How do i...can extract data from a text file in excel format in C#?

查看:70
本文介绍了我如何...可以在C#中以excel格式从文本文件中提取数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我搜索但没有找到任何解决方案



我尝试过:



i已经尝试但它不起作用,plz help

解决方案

你提供的信息含糊不清。

如果你的文字文件'是 CSV 然后你可以自己解析它,这不是一项艰巨的任务。

另一方面,如果它在''原生'excel格式(即 Office Open XML - Wikipedia [ ^ ])那么它不是文本的,是二进制的,你最好使用 Excel 自动化。查看代码项目文章:使用C#使用Excel [ ^ ]。

i searched but didnt find any solution

What I have tried:

i have tried but it doesnot work,,plz help

解决方案

The info you provided are vague.
If you 'text file' is a CSV then you may parse it yourself, it is not a daunting task.
On the other end if it is in the 'native' excel format (i.e. Office Open XML - Wikipedia[^]) then it isn't textual, is binary and you'd probably better use Excel automation. Check out this Code Project article: Working with Excel Using C#[^].


这篇关于我如何...可以在C#中以excel格式从文本文件中提取数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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