Hot to get a value of cell using VSTO


Hi All with this code u can get the cell values of a row of an excel sheet….. try it
 

Dim apedit As New APEditValues

Globals.ThisWorkbook.ActionsPane.Controls.Add(apedit)

Dim dsSrc As DataTable = Nothing

Src = Globals.Sheet1.List1.DataSource

Dim intValue As Integer = Globals.Sheet1.List1.SelectedIndex – 1

apedit.EditProjectCodeTextBox.Text = dsSrc.Rows(intValue)(0).ToString

apedit.EditProjectNameTextBox.Text = dsSrc.Rows(intValue)(1).ToString

apedit.EditTeamMembersTextBox.Text = dsSrc.Rows(intValue)(2).ToString

 
 
 
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s