Solved

String conversion

Posted on 2006-07-09
3
469 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

630 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