How to read #N/A and #REF! from excel while importing excel sheet into NAV through reports? (NAV 2009R2 classic client)

Hello guys

I have to know whether it’s possible to read #N/A and #REF! values in NAV as text constants and convert it to blank.

I am using following code to access the cells within loop(using excel automations).

LineDetail[2] := FORMAT(xlSheet.Range(cHdr[2]+cRow).Value);

So when ever the cell finds #N/A or #REF! an error message is popped up as "this data type is not supported by C/SIDE. Variant data type is not supported I believe. But, I just wanna know is there any way to retrieve #N/A and #REF! cells and convert it into blank text. I used evaluate function but it didn’t work too.

Manually I 'm aware to make this blank in excel and to import the values into NAV table successfully without any issues but I’m looking forward to automate this report once a week to import excel sheet values into NAV table and so manual entry should be avoided in this case.

Looking forward for your quick suggestions.

I resolved this myself. So you guys can ignore this question. I used evaluate function with if condition and it worked.