Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15571

VS 2019 Not able to read cell data from Excel

$
0
0
Dear Gurus,
I am facing the below issue- appreciate your help.

This Code Works:
DataGridView1.Rows.Add(rowcount, xlWorksheet.Range("A2").Text)

This code does not:
DataGridView1.Rows.Add(rowcount, xlRange.Cells(2,2))

I am not able to add .TEXT or Value when I use xlRange.Cells Property, it does not appear and gives an error if I type it.

I am a newbie - maybe the question is a bit foolish - but Please help.

Regards,
Karibandi.

Viewing all articles
Browse latest Browse all 15571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>