A1.fromVector constructor

A1.fromVector(
  1. int column,
  2. int row, {
  3. bool columnAbsolute = false,
  4. bool rowAbsolute = false,
})

Create an A1 from column and row

Both column are row are int that are zero-based

Examples:

A1 a1 = A1.fromVector(0,0); //A1
a1 = A1.fromVector(1,1);  // B2
a1 = A1.fromVector(1,344); // B324
a1 = A1.fromVector(1,-1); // FormatException

Implementation

A1.fromVector(int column, int row, {
  this.columnAbsolute = false,
  this.rowAbsolute = false,
}) {
  if (row.isNegative) {
    throw FormatException('row $row must be positive');
  }
  if (row > maxRows) {
    throw FormatException('row must be no greater than $maxRows');
  }
  if (column > maxColumns) {
    throw FormatException('column must be no greater than $maxColumns');
  }
  letters = column.a1Letters;
  digits = row + 1;
}