LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

writing a string into a cell of an excel sheet using activex

hi!

i´m already writing float and integer values to my excel sheet using activx!
that works fine.

but i also want to write a simple text to the excel sheet. unfortunately, up
to now i found no solution to this problem

can anyone tell me how this is possible!?!

thanks, ötzi
0 Kudos
Message 1 of 4
(3,509 Views)
I'm not sure what version of CVI you are using, but if you are using CVI 6.0 or greater, the easiest way to communicate with Excel is the Excel Report Tool (excelreport.fp). You can just use the ExcelRpt_WriteData or the ExcelRpt_SetCellValue functions to write strings to cells in Excel. If you don't want to use the excelreport.fp, you would have to put the string in a variant with CA_VariantSetCString and then write the variant to the cell range with Excel_SetProperty on a range object as seen on line 575 of the excel2000demo.prj.

The excelreport.fp tool will save you enormous time in converting datatypes to and from variants and in navigating the huge ActiveX API for Excel. I would use it if you have CVI 6.0 or above.

Best Regards,

Chris Matthew
s
National Instruments
0 Kudos
Message 2 of 4
(3,509 Views)
I am having trouble finding the excelreport.fp information referenced above, could you point me to this info?

Thanks,
Scott Trosper
0 Kudos
Message 3 of 4
(3,509 Views)
Look in ...\CVI\samples\activex\excel.
The full path for the default installation is c:\Program Files\National Instruments\MeasurementStudio\CVI\samples\activex\excel.
0 Kudos
Message 4 of 4
(3,509 Views)