[go: nahoru, domu]

Skip to content

theinternetfolks/excel-formula

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Internet Folks Logo

@theinternetfolks/excel-formula

GitHub license Maintainer Downloads

Library to help you parse Excel Formulas to various formats, including JS. A fork of excel-formula suitable for all JS-environments, with the least size.

Installation

Install with npm

  npm install @theinternetfolks/excel-formula

Install with yarn

  yarn add @theinternetfolks/excel-formula

Usage

Convert to Javascript

import { ExcelFormula } from "@theinternetfolks/excel-formula";

console.log(ExcelFormula.toJS(`IF(1 + 1 = 2,"Hello","Goodbye")`));

// (1+1===2?"Hello":"Goodbye")

Get All Tokens

import { ExcelFormula } from "@theinternetfolks/excel-formula";

console.log(ExcelFormula.getTokens(`IF(1 + 1 = 2,"Hello","Goodbye")`));

// F_tokens {TOK_SUBTYPE_STOP: 'stop', items: Array(11), index: -1, add: ƒ, addRef: ƒ, …}

License

MIT