https://github.com/mike182uk/cellref
Convert between cell reference styles (A1 notation & R1C1 notation)
https://github.com/mike182uk/cellref
a1 excel r1c1 spreadsheet xslx
Last synced: 2 months ago
JSON representation
Convert between cell reference styles (A1 notation & R1C1 notation)
- Host: GitHub
- URL: https://github.com/mike182uk/cellref
- Owner: mike182uk
- License: mit
- Created: 2015-11-11T10:16:19.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2025-02-01T19:06:32.000Z (4 months ago)
- Last Synced: 2025-03-13T12:47:55.507Z (3 months ago)
- Topics: a1, excel, r1c1, spreadsheet, xslx
- Language: JavaScript
- Homepage:
- Size: 438 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# cellref
[](https://www.npmjs.com/package/cellref)
[](https://github.com/mike182uk/cellref/actions/workflows/ci.yml?query=workflow%3ACI)
[](https://coveralls.io/r/mike182uk/cellref)
[](https://www.npmjs.com/package/cellref)
[](https://www.npmjs.com/package/cellref)Convert between cell reference styles (`A1` notation & `R1C1` notation).
## Installation
```
npm install --save cellref
```## Usage
### Convert A1 to R1C1
```js
const cellref = require('cellref')cellref.toR1C1('BU59') // will return R59C73
```### Convert R1C1 to A1
```js
const cellref = require('cellref')cellref.toA1('R59C73') // will return BU59
```### Convert automatically based on the input
```js
const cellref = require('cellref')cellref('R59C73') // will return BU59
cellref('BU59') // will return R59C73
```If an invalid cell reference (not `A1` or `R1C1` notation) is passed as an argument to any of cellref functions, an `Error` will be thrown.