06-14-2011 05:53 AM
Bonjour
Je souhaite ecrir un char dans une case d'excel.
char NumeroCertificat[20] = "CERTIFICAT";
toto = CA_VariantChar (*NumeroCertificat);
Excel_SetProperty (ExcelRangeHandle, &ErrorInfo, Excel_RangeValue2, CAVT_VARIANT, toto);
Pour cela, j'utilise la fonction " Excel_SetProperty " à laquelle on doit passer un Variant
Je converti danc mon char ( ici : toto ) en Variant avec la fonction "CA_VariantChar"
Probleme : cette fonctionne ne semble pas me retourner un varant du type char, mais une valeur ( ici : 67 ... )
Merci de votre aide
Cdlt
Jerome
06-15-2011 04:06 AM
Hi,
Thanks for posting on NI froum.
If you want to post on the english forum, you must speak in english for all others users of the comunity.
For your problem, I think CA_VariantChar change only one character, maybe you could use CA_VariantSetCString to convert a string to a variant.
Another possible problem is the " * " in CA_VariantChar parameter.
Regards,
Nicolas M.
National Instruments France
Journées Techniques LabVIEW 2012 : du 27 septembre au 22 novembre
2 sessions en parallèle : Débuter avec LabVIEW - Développer avec LabVIEW