组合框填充来自excel的项目 [英] combobox column fill with items from excel

查看:72
本文介绍了组合框填充来自excel的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

组合框中的问题,我有1个组合框,如何从excel文件中添加这个组合框内的项目...谢谢

解决方案

有3种方式:

1)使用OleDb对象和 DataSource [< a href =http://msdn.microsoft.com/en-us/library/x8160f6f.aspxtarget =_ blanktitle =New Window> ^ ]属性,

2)使用Excel.Interop,

3)使用CreateObject()函数。



使用OLEDB读取和编写Excel [ ^ ]

http://blog.themobilebrand.com/technology/c/reading-an-excel-workbook-使用-C-和-OLEDB / [ ^ ]

http://forums.asp.net/t/1255191。 aspx / 1 [ ^ ]

http://csharp.net-informations.com/excel/csharp -excel-tutorial.htm [ ^ ]

http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/b6e8a28c-6760-4e86-a1aa-e2ce9ec36380/ [ ^ ]

http://stackoverflow.com/questions/657131/how-to-read -data-of-an-excel-file-using-c [ ^ ]



其他资源:

http://exceldatareader.codeplex.com/ [ ^ ]


problem in combobox column , i have 1 combobox , how can i add an items inside of this combobox from an excel file ... thanks

解决方案

There are 3 ways:
1) using OleDb objects and DataSource[^] property,
2) using Excel.Interop,
3) using CreateObject() function.

Reading and Writing Excel using OLEDB[^]
http://blog.themobilebrand.com/technology/c/reading-an-excel-workbook-using-c-and-oledb/[^]
http://forums.asp.net/t/1255191.aspx/1[^]
http://csharp.net-informations.com/excel/csharp-excel-tutorial.htm[^]
http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/b6e8a28c-6760-4e86-a1aa-e2ce9ec36380/[^]
http://stackoverflow.com/questions/657131/how-to-read-data-of-an-excel-file-using-c[^]

Other resources:
http://exceldatareader.codeplex.com/[^]


这篇关于组合框填充来自excel的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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