Excelerate

Installation

npm i excelerate

Usage

import { Position } from 'excelerate';

Single Cell

ABC
1
2
3

Position.of('a1').toObject();
// { start: { x: 1, y: 1 }, end: { x: 1, y: 1 } }

Row Range

ABC
1
2
3

Position.of('a1:c1').toObject();
// { start: { x: 1, y: 1 }, end: { x: 3, y: 1 } }

Column Range

ABC
1
2
3

Position.of('a1:a3').toObject();
// { start: { x: 1, y: 1 }, end: { x: 1, y: 3 } }

Row & Column Range

ABC
1
2
3

Position.of('a1:b3').toObject();
// { start: { x: 1, y: 1 }, end: { x: 2, y: 3 } }