Name
xlsx.GetCellReference -- get cell reference
Synopsis
ref = xlsx.GetCellReference(id, x, y[, xyref, sheet])
ref = xlsx.GetCellReference(id, ref[, xyref, sheet])
Function
This function returns a reference to the specified cell, either as a column/row reference or an alphanumerical cell id. If the xyref parameter is set to True, the cell reference will be returned as a pair of column (x) and row (y) coordinates to the cell. If xyref is set to False (also the default), the cell reference will be returned as an alphanumerical string containing column and row identifier of the cell, e.g. "A1".

There are two ways of specifying the cell whose reference should be returned: You can either specify the cell to use by passing the cell's column (x) and row (y) position in the x and y arguments. Those positions start from 1 for the first column and row. Alternatively, you can also specify the cell by passing its reference in the ref parameter. This can either be a string, e.g. "A10" for the first cell in the 10th row, or an iterator state returned by the xlsx.CellRange() function. Optionally, you can also pass the index of the worksheet to use in the optional sheet parameter (starting from 1 for the first worksheet). If the sheet parameter is omitted, the worksheet set by xlsx.SetDefaultSheet() will be used.

Inputs
id
identifier of the XLSX document to use
x
column index of the cell to use (starting from 1)
y
row index of the cell to use (starting from 1)
ref
cell reference (e.g. "A1" or an iterator state), only used when x and y are omitted
xyref
True if you want the reference as a pair of column/row coordinates or False if you want the reference as an alphanumerical string (defaults to False)
sheet
optional: index of the worksheet to use (defaults to the index of the default worksheet)
Results
ref
the cell reference

Show TOC