如何转换的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().