SheetXL - v1.0.2
    Preparing search index...

    Function useCellRange

    • Returns the range at address and re-renders whenever anything in it changes: values (including recalculated formula results), styles, or its address.

      Parameters

      • target: CellRangeTarget | null | undefined

        The workbook or sheet to read from, or null while there is none.

      • address: Address

        The range's address. An object address is compared by identity, so keep it stable.

      • Optionaloptions: CellRangeHookOptions

        Listener options, and an optional onChange that receives each change event.

      Returns ICellRange | null

      The range, or null while target is null.

      The returned range is the same object across renders; read from it during render. For a single value use useCellValue, and for a single cell's full state use useCell.

      const items = useCellRange(sheet, 'A7:C18');
      const rows = items?.getValues() ?? [];