DataGrid上的DataGridView.GetClipboardContent()等效

我无法在DataGrid VC ++ .Net Framework 1.1上找到DataGridView.GetClipboardContent()的等效方法,如果不存在我怎样才能获得相同的function,我的意思是复制剪贴板对象上的所有行和标题然后粘贴它在Excel表格上……

//code for send data to excel dataGridView1.SelectAll(); DataObject dataObj = dataGridView1.GetClipboardContent(); Clipboard.SetDataObject(dataObj, true); ws.Paste(System.Type.Missing, System.Type.Missing); // ws = worksheet dataGridView1.ClearSelection(); 

谢谢

你试过这个吗?