Skip to content

cell

Information about formatting, location, or contents of a cell.

v = cell(info_type, reference)

Returns properties of reference based on info_type:

  • 'address' — A1-style address
  • 'col' — column number
  • 'row' — row number
  • 'contents' — cell value
  • 'filename' — workbook file path
  • 'format' — Excel format code
  • 'type''b' (blank), 'l' (text), or 'v' (value)
  • 'width' — column width
  • 'protect' — locked status
cell('address', A1) % '$A$1'
  • info — Information about the current operating environment.
  • address — Cell address as a text string.
  • type — Numeric code identifying the type of a value.