从记事本中提取到Excel工作表 [英] Extract from notepad to Excel sheet

查看:149
本文介绍了从记事本中提取到Excel工作表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个这样的文本文件::

名称帐户地址

------------------- ----------------

Abc 1234 London

Def 2345 Usa

Ghe 7890 Italy



我希望使用c#在excel中导出,每个值都在不同的单元格中..

名称,帐户,地址将标题对于每一列。在每个单元格中,相应的值将会出现。

I have a text file like this::
Name Account Address
-----------------------------------
Abc 1234 London
Def 2345 Usa
Ghe 7890 Italy

I want this to export in excel using c# and each value will be in different cell..
Name,Account, Address will be heading for each column. And under that in each cell the corresponding values will come.

推荐答案

你可以使用 ADO.NET [ ^ ]。



请阅读这些文章:

从.NET应用程序访问Microsoft Office数据 [ ^ ]

关于文本文件的大量ADO [ ^ ]

Schema.ini文件(文本文件驱动程序) [ ^ ]

使用OleDb导入文本文件(选项卡,CSV,自定义) [ ^ ]

阅读逗号分隔文件 [ ^ ]

读取文本文件(txt,csv,日志,标签,固定长度) [ ^ ]
You can do it using ADO.NET[^].

Please, read these articles:
Accessing Microsoft Office Data from .NET Applications[^]
Much ADO About Text Files[^]
Schema.ini File (Text File Driver)[^]
Using OleDb to Import Text Files (tab, CSV, custom)[^]
Reading Comma Delimited Files[^]
Read Text File (txt, csv, log, tab, fixed length)[^]


这篇关于从记事本中提取到Excel工作表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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