如何转换的XLS文件,XML在C#中? [英] How do I convert an XLS document to XML in C#?

查看:140
本文介绍了如何转换的XLS文件,XML在C#中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Excel电子表格,看起来像:

I have an Excel spreadsheet that looks like:

表格

我想将其转换为XML的一些看起来像:

I'd like to convert this to some XML that looks like:

<UserName>
bla1
</UserName>
<Mail>
bla1[at]bla2.com
</Mail>
<Address>
World
</Address>



谁能帮助我在C#这样做吗?

can anyone help me do this in C#?

推荐答案

目前谷歌的结果看看:结果
http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/b6e8a28c-6760-4e86-a1aa -e2ce9ec36380

Take a look at this Google result:
http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/b6e8a28c-6760-4e86-a1aa-e2ce9ec36380

读取Excel文件成一个DataTable,并使用DataTable.WriteXml()。

Read the Excel file into a DataTable and use DataTable.WriteXml().

这篇关于如何转换的XLS文件,XML在C#中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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