Hi,
I have a table that is loaded with a csv file. I want to loop through each column on a particular row and check if the cell has data (string or number) or not and count the number of instances where there is data (like the COUNTIF function in excel). However, the data can be either string and numbers so my code below fails when a cell contains a string because CellCheck is "dimed" as Int. I get the following error message
Return values(Col)
java.long.NumberFormatException:Invalid double:"S"
The "S" is the string that is in the cell when it fails.
I wonder if there is a Boolean test that looks at a cell and return True if there is something in the cell and False if empty. I want to use this information later so I need to be able to count the data cells progammatically.
Any suggestions? Thanks
Dim CellCheck As Int
Dim CellFull As Int:CellFull=0
Row = 3
For i=2 To 13
CellCheck= SWOTTable.GetValue(i,Row)
Log(CellCheck)
If CellCheck>=0 Then
CellFull=CellFull+1
End If
Next
If CellFull>3 Then
ToastMessageShow("There are " & CellCheck & " cells with data in Row " & Row)
End If