Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
XL.Sheet.AreCellsEmpty
Checks whether the cells in the given range are empty.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
XL | 13.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameters
Parameter | Description | Example |
---|---|---|
bookRef | The reference to the workbook. Please use XL.LoadBook to load a file. | $ref |
sheetIndex | The index of the sheet. This number ranges from 0 to XL.Book.SheetCount-1. | 0 |
First row | The first row to process. First row has index 0. | 3 |
Last row | The last row to process. First row has index 0. | 6 |
First column | The first column to process. First column has index 0. | 2 |
Last column | The last column to process. First column has index 0. | 4 |
Result
Returns 1, 0 or error.
Description
Checks whether the cells in the given range are empty.If one of the cell has a text (even empty) or number, the return is zero.
Examples
Find empty rows:
Set Variable [ $sheet ; Value: 0 ]
Set Variable [ $lastCol ; Value: 7 ]
Set Variable [ $firstCol ; Value: 0 ]
Set Variable [ $count ; Value: MBS( "XL.Sheet.GetLastRow"; $bookRef; $sheet ) ]
Set Variable [ $index ; Value: 1 ]
Set Variable [ $EmptyRows ; Value: "" ]
If [ $index ≤ $count ]
Loop
# your script steps here
Set Variable [ $row ; Value: $index ]
Set Variable [ $r ; Value: MBS( "XL.Sheet.AreCellsEmpty"; $bookRef; $sheet; $row; $row; $firstCol; $lastCol) ]
If [ $r ]
Set Variable [ $EmptyRows ; Value: $EmptyRows & $row & ¶ ]
End If
#
# next
Set Variable [ $index ; Value: $index + 1 ]
Exit Loop If [ $index > $count ]
End Loop
End If
Show Custom Dialog [ "Empty rows" ; $EmptyRows ]
See also
Release notes
- Version 13.2
- Added XL.Sheet.AreCellsEmpty function.
Blog Entries
This function checks for a license.
Created 30th March 2023, last changed 31st March 2023