Click here to Skip to main content
15,902,112 members

Comments by Member 13727051 (Top 3 by date)

Member 13727051 15-Mar-18 22:02pm View    
thank you Bryian Tan ! It worked perfectly fine in my Sytem. only a little bit change I has was :


If selectedRowCount > 0 Then

For j = 0 To DataGridView1.ColumnCount - 1


For k As Integer = 1 To DataGridView1.Columns.Count
xlWorkSheet.Cells(1, k) = DataGridView1.Columns(k - 1).HeaderText
xlWorkSheet.Cells.RowHeight = 20
xlWorkSheet.Cells.ColumnWidth = 20


For i = 0 To selectedRowCount - 1

xlWorkSheet.Cells(i + 2, j + 1) = DataGridView1(j, DataGridView1.SelectedRows(i).Index).Value.ToString()
Next i

For i = 0 To DataGridView1.RowCount - 1


Select Case DataGridView1.Rows(i).Height = 20

End Select
Next
Next
Next
Member 13727051 15-Mar-18 1:21am View    
i want to see the selected rows into excel
Member 13727051 15-Mar-18 1:19am View    
Deleted
i just want to see the selected rows into excel