I want the below function to pick data from Row till Column H, however this function is picking details up to the last used cell.
Below are the VBA code I'm using, help me to fix this.
Function getapproverdataHTML() As String
Dim datacolumn As Range
Dim datarow As Range
Dim R As Range
Dim C As Range
Dim str As String
sheets(2).Activate
Set datacolumn = Range("A1", Range("A1").End(xlDown))
str = "<table>"
For Each R In datacolumn
str = str & "<tr>"
Set datarow = Range(R, R.End(xlToRight))
For Each C In datarow
str = str & "<td>" & C.Value & "</td>"
Next C
str = str & "</tr>"
Next R
str = str & "</table>"
getapproverdataHTML = str
End Function