LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I find out if Text in a Cell in Excel has strikethrough Font?

Solved!
Go to solution

I'm reading in an excel spreadsheet and reading in the text from the required cells. I want to skip any cells where the text has been striked (struck?) through.

 

I've tried using the code:

 

error = Excel_GetProperty (ExcelSingleCellRangeHandle, &ErrorInfo, Excel_FontStrikethrough, CAVT_OBJHANDLE, &MyHandle);

 

but this didn't work.

 

Any suggestion?

 

Thanks.

 Neil.

 

0 Kudos
Message 1 of 2
(3,359 Views)
Solution
Accepted by topic author Regenersis

Hi Neil,

 

If you use          ExcelRpt_GetCellRangeAttribute (CAObjHandle worksheetHandle, char cellRange[], int attributeID, void *attributeValue)

and use if...else with the following properties          ExRConst_False     (Boolean False)          and          ExRConst_True     (Boolean True)          

You then should be able to manipulate as necessary.

Help with these functions can be found in the NI Labwidows/CVI Help under Tools Library>>Excel Report>>Alphabetical List of Functions and highlighting the ExcelRpt_GetCellRangeAttribute function.

Hope this helps

Steve H

Applications Engineer

National Instruments UK

Message 2 of 2
(3,340 Views)