Link to home
Start Free TrialLog in
Avatar of Mauaka
Mauaka

asked on

String conversion

How can I convert CString to COleVariant?

Problem statement:
Currently, i'm developing an MFC program that reads file status from files and wishes to display them in Excel format. However, the function I got needs and input of COleVariant.
In Summary, filestatus returns CString while the function for displaying excel requires COleVariant.
Is there a way to convert CString to COleVariant and vise versa?

Request.... for future reference, is there a site / link which holds codes in data format conversion? such as CString WCHAR WSTRING?

Thank you for reading.

Dozo yoroshiku Onegaishimasu.
ASKER CERTIFIED SOLUTION
Avatar of cookre
cookre
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Raj_Kau
Raj_Kau



      CString strData = "hi";
      
      COleVariant Variant;
      Variant = strData;
      

its working.

Raj