TCHAR text[256];
_stprintf(text, _T("2-4"));

Using code like this I copy 'text' to the clipboard and then paste it into Excel. But Excel interprets "2-4" as February 4th and puts "4-Feb" into the cell.

Is there some way I can format a string so that Excel does not try to do a conversion?

When entering the string directly into Excel typing an apostrophe (') first will work, but from C++ code the apostrophe stays when pasted into the cell.

I have also tried putting quotes around the string - _stprintf(_T("\"2-4\"")) - but that doesn't work either.