StringBuilder buffer = new StringBuilder(); for (int i = 0; i < lv.Columns.Count; i++) { buffer.Append(lv.Columns[i].Text); buffer.Append("\t"); } buffer.Append("\n"); for (int i = 0; i < lv.Items.Count; i++) { buffer.Append(lv.Items[i].SubItems[0].Text); buffer.Append("\t"); buffer.Append(lv.Items[i].SubItems[1].Text); buffer.Append("\t"); buffer.Append(lv.Items[i].SubItems[2].Text); //} buffer.Append("\n"); Clipboard.SetDataObject(buffer.ToString();
Clipboard.Clear();
.SetDataObject
Clipboard.SetData(DataFormats.CommaSeparatedValue, buffer)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)