I have an excel sheet with the following:
So, what I am trying to achi
In case you are dealing with Unicode here is the code to paste to a DataTable that is binded to a the DataGridView
DataObject o = (DataObject)Clipboard.GetDataObject();
if (o.GetDataPresent(DataFormats.Text))
{
string[] pastedRows = Regex.Split(o.GetText().TrimEnd("\r\n".ToCharArray()), "\r\n");
foreach (string pastedRow in pastedRows)
{
string[] pastedRowCells = pastedRow.Split(new char[] { '\t' });
var temp = dt1.NewRow();
for (int i = 0; i < pastedRowCells.Length; i++)
temp[i] = pastedRowCells[i];
dt1.Rows.Add(temp);
}
}