macMikey / 4d-google-workspace

manage google docs and sheets
Other
4 stars 2 forks source link

find blank row #36

Open macMikey opened 1 year ago

macMikey commented 1 year ago

like when trying to find the bottom of a table useful when trying to read data

Here's doing it one way

$blankRowNumber:=$dataRow  // starting to look on $dataRow
$done:=False
For each ($rowData; $values.values; $dataRow) Until ($done)
    While ($rowData.length<=$commentCol)
        $rowData.push("")
    End while   //($rowData.length<=($commentCol+1))

    If ((String($rowData[$dateCol])#"") |\
        (String($rowData[$psCol])#"") |\
        (String($rowData[$shipCol])#"") |\
        (String($rowData[$recCol])#""))  //skip comments column b/c it might be undefined.
        $blankRowNumber:=$blankRowNumber+1
    Else 
        $done:=True
    End if   // ((String($rowData[$dateCol])="") & (String($rowData[$psCol])="") & (String($rowData[$shipCol])="") & (String($rowData[$recCol])="") & (String($rowData[$commentCol])=""))
End for each   //($rowData;$values.values) Until ($done)