如何在C#中将excel数据保存在数组中? [英] How can I save excel data in array in C#?
本文介绍了如何在C#中将excel数据保存在数组中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的朋友们。
我的表格中有两个按钮。一个按钮是浏览以选择一个excel文件。
下一个按钮是保存。现在我想在2D数组中保存excel数据。
(我没有关于列和行的任何信息)
我该怎么办?这个????
谢谢
我尝试了什么:
在C#中保存Excel中的Excel数据
hi my friends.
i have two button in my form. one button is "browse" for select a excel file.
next button is "save". now i want save excel data in 2D array.
(and i dont have any information about column and row)
how can i do this????
Thanks
What I have tried:
save excel data in array in C#
推荐答案
您可以使用Microsoft Open XML Format SDK。请看我过去的答案:
从gridview或asp.net中的数据表记录创建doc文件c# [ ^ ],
Microsot office Interop [ ^ ]。
另请参阅Microsoft关于使用Interop的这些警告:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757 #kb2 [ ^ ],
http://support.microsoft.com/kb/257757/en-us [ ^ ]。
另请参阅此答案以及其他参考:如何从Add Reference中添加microsoft excel 15.0对象库MS Visual Studio 2010 [ ^ ]。
-SA
You can use Microsoft Open XML Format SDK. Please see my past answers:
Create a doc file from gridview or datatable records in asp.net c#[^],
Microsot office Interop[^].
See also these warnings from Microsoft on the use of Interop:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2[^],
http://support.microsoft.com/kb/257757/en-us[^].
See also this answers with other references: How to add microsoft excel 15.0 object library from Add Reference in MS Visual Studio 2010[^].
—SA
这篇关于如何在C#中将excel数据保存在数组中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文