Rows n’ Columns Docs
Visit HomepagePricing
  • Introduction
  • License
  • Demos
  • Getting started
    • Installation
    • Spreadsheet state
    • Headless UI
    • Imperative Spreadsheet API
    • Examples
  • ⚙️Configuration
    • Features
      • Data validation
      • Formula evaluation
      • Real-time data
      • Cell editors
      • Cell renderer
      • Structured Cell Renderer
      • Theming
      • Styling
      • Context menu
      • Localisation
      • Undo/Redo
      • Conditional formatting
      • Named ranges
      • Structured references
        • Schema based tables and columns
        • Calculated columns
      • Basic filter or Excel AutoFilter
      • Charts
      • Embedded content
      • Calculate on-demand
      • Drag and Drop
      • Pivoting and Grouping (Coming soon)
      • Tokenizer
      • Lazy loading/Infinite scrolling
      • OpenAI/Chat GPT Integration
      • Search
      • Formula protection
      • Autofill
      • Export canvas as image
    • Components
      • Canvas Grid
      • Toolbar
      • Sheet Tabs
      • Sheet Switcher
      • Sheet Status
      • Range Selector
      • Formula Input
      • Selection Input
      • SheetSearch
      • NamedRangeEditor
      • DeleteSheetConfirmation
      • TableEditor
      • Cell Format Editor
      • Conditional Format Editor
      • Data Validation Editor
      • Insert Link Editor
      • Insert Image Editor
    • API
      • Cell Data
      • Sheets
      • SpreadsheetProvider
      • useSpreadsheet
      • Modules
      • SheetCell
    • Using Spreadsheet with NextJS
    • Keyboard shortcuts
  • Collaboration
    • Real time collaboration
    • Yjs Collaboration
    • Supabase realtime Collaboration
  • Charts
    • Charts
    • Custom charts
  • Excel and Google sheets
    • CSV
    • Excel
    • Google sheets (Coming soon)
  • Functions
    • Named functions
    • Array formulas
  • Data persistence
    • Server side data persistence
    • React Query integration
  • Specifications
    • Browser support
    • Third party licenses
  • Support
    • Contact support
    • Report bugs
    • Feature requests
Powered by GitBook
On this page
  • Collision detection
  • Creating a custom Array formula

Was this helpful?

  1. Functions

Array formulas

Formulas can return values that spans multiple cells

PreviousNamed functionsNextServer side data persistence

Last updated 2 years ago

Was this helpful?

Spreadsheet can display formulas that return an array of values, which spans across multiple cells. This is useful if you want to display dynamic tabular data in the spreadsheet.

Below is a sample Array formula that fetches covid data

=IMPORTDATA("https://api.covidtracking.com/v1/us/daily.csv")

With the power of Structured references, you can convert this data to table, and start filtering/sorting on this data.

Collision detection

If an array formula tries to overwrite a non-empty cell, a REF error is thrown.

Creating a custom Array formula

Returning a 2-D array from a custom formula function will mark a cell as an array function cell.

const MY_FUNCTION = (parser: FormulaParser, arg: FunctionArgument) => {
  return [
    [
      "foo",
      "bar"
    ]
  ]
}
Array formula to structured data