Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 9 days 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 (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2024-10-01T19:56:00.000Z (about 1 month ago)
- Last Synced: 2024-10-13T21:35:32.846Z (24 days ago)
- Topics: a1, excel, r1c1, spreadsheet, xslx
- Language: JavaScript
- Homepage:
- Size: 354 KB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# cellref
[![Version](https://img.shields.io/npm/v/cellref.svg?style=flat-square)](https://www.npmjs.com/package/cellref)
[![Build Status](https://img.shields.io/github/actions/workflow/status/mike182uk/cellref/ci.yml?branch=main&style=flat-square)](https://github.com/mike182uk/cellref/actions/workflows/ci.yml?query=workflow%3ACI)
[![Coveralls](https://img.shields.io/coveralls/mike182uk/cellref/main.svg?style=flat-square)](https://coveralls.io/r/mike182uk/cellref)
[![npm](https://img.shields.io/npm/dm/cellref.svg?style=flat-square)](https://www.npmjs.com/package/cellref)
[![License](https://img.shields.io/github/license/mike182uk/cellref.svg?style=flat-square)](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.