Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > using excle file
 

using excle file

hi

how can i use excel file in the database as when i connect to database ,first i can use the value of excel file in the data base and then after cinnecting show in the form in the datagideviwe

thanks for your answer

padari  Tuesday, December 25, 2007 8:07 AM

Hi,

There are a couple of ways.

One would be to add a COM reference to Excel and read worksheet data, and then show those data with DataGridView.

The other may be to use OleDb to connect to the spreadsheet, and then show with DataGridView.

And you can refer to following thread for sample code.

https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2104957&SiteID=1

Hope this helps!

Yan-Fei Wei  Wednesday, December 26, 2007 10:50 AM

Hi,

There are a couple of ways.

One would be to add a COM reference to Excel and read worksheet data, and then show those data with DataGridView.

The other may be to use OleDb to connect to the spreadsheet, and then show with DataGridView.

And you can refer to following thread for sample code.

https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2104957&SiteID=1

Hope this helps!

Yan-Fei Wei  Wednesday, December 26, 2007 10:50 AM

You can use google to search for other answers

Custom Search

More Threads

• Databinding textBoxes
• DateTimePicker and DataBinding
• DataGridViewTextBoxCell that supports 'overflow'...
• dataGridView + mousewheels
• Datagridviews Button Click Event???
• Datagridview - ComboBox column getting blanked out
• AutoResizeColumnHeadersHeight problem with DataGridView
• Expanding/Collasping rows in DataGridView
• Insert Row into DataBound DataGridView
• How to load different images in imagecolumn