I'm trying to copy data to clipboard in Csv format.
This is my code:
COleDataSource* pSource = new COleDataSource();
UINT aFmt = ::RegisterClipboardFormat(_T("Csv"));
CString text = _T("45,5,4\n2,1,1");
HGLOBAL hMem = sf.Detach();
Now, when I'm trying to paste to excel, I do not get 6 cells as I expected (with values: 45 5 4 2 1 1).
What I get is only one cell with the value "4" (which is probably the prefix of "45", because when I replace the "45" in the code to "78" I get one cell with "7").
Can someone please help me with this ?