LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

"cell comment"

Hello everyone!
I have problem with reading comments of cells in Excel.
I can add,clear comments of cells but I don't know how
could to read this comment in LabWindows ,in VBA I know it. Can anybody help me?
0 Kudos
Message 1 of 3
(2,986 Views)
Hello BranoG,

You can read cell comments in Excel by using the Excel Report instrument. The Excel Report functions are located in ..\CVI71\toolslib\activex\excel\excelreport.fp.

In particular, the function you should look at is ExcelRpt_GetCellRangeAttribute() with the attribute set to Comment (ER_CR_ATTR_COMMENT).

Hope that helps.
Wendy L
LabWindows/CVI Developer Newsletter
Message 2 of 3
(2,960 Views)
Thank you WENDY:) it,s running.

And for other users...you can find ExcelRpt_GetCellRangeAttribute() also in CVI60\samples\activex\excel\excelreport.fp

if you want make your own fnc then use this:

Excel_GetProperty (ExcelSingleCellRangeHandle, NULL, Excel_RangeComment, CAVT_OBJHANDLE, &ExcelCommentHandle);
Excel_CommentText (ExcelCommentHandle,NULL,CA_DEFAULT_VAL, CA_DEFAULT_VAL,CA_DEFAULT_VAL,&charCommentText );
0 Kudos
Message 3 of 3
(2,941 Views)