Solved

String conversion

Posted on 2006-07-09
3
467 Views
Last Modified: 2012-06-22
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.
0
Comment
Question by:Mauaka
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 22

Accepted Solution

by:
cookre earned 50 total points
ID: 17070690
0
 
LVL 3

Expert Comment

by:Raj_Kau
ID: 17070702


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

its working.

Raj
0
 
LVL 3

Expert Comment

by:Raj_Kau
ID: 17070706
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question