I have an excel sheet with the following:
So, what I am trying to achi
A really nice solution was posted here:
But, one line needs to be changed:
if (dgv.Rows.Count < (r + rowsInClipboard.Length))
dgv.Rows.Add(r + rowsInClipboard.Length - dgv.Rows.Count);
needs to be changed to:
if (dgv.Rows.Count < (r + rowsInClipboard.Length))
dgv.Rows.Add(r + rowsInClipboard.Length+1 - dgv.Rows.Count);
If this line isn't changes, the last row pasted will not be passed to SQL.