All Projects → vogtb → spreadsheet

vogtb / spreadsheet

Licence: other
TypeScript/javascript spreadsheet parser, with formulas.

Programming Languages

typescript
32286 projects
shell
77523 projects

Projects that are alternatives of or similar to spreadsheet

Formula Parser
Javascript Library parsing Excel Formulas and more
Stars: ✭ 544 (+1260%)
Mutual labels:  formula, excel, spreadsheet
Excelize
Golang library for reading and writing Microsoft Excel™ (XLSX) files.
Stars: ✭ 10,286 (+25615%)
Mutual labels:  formula, excel, spreadsheet
Luckysheet
Luckysheet is an online spreadsheet like excel that is powerful, simple to configure, and completely open source.
Stars: ✭ 9,772 (+24330%)
Mutual labels:  formula, excel, spreadsheet
Reogrid
Fast and powerful .NET spreadsheet component, support data format, freeze, outline, formula calculation, chart, script execution and etc. Compatible with Excel 2007 (.xlsx) format and working on .NET 3.5 (or client profile), WPF and Android platform.
Stars: ✭ 532 (+1230%)
Mutual labels:  formula, excel, spreadsheet
Calx.js
jQuery Calx - a jQuery plugin for creating formula-based calculation form
Stars: ✭ 190 (+375%)
Mutual labels:  formula, excel, spreadsheet
fast-formula-parser
Parse and evaluate MS Excel formula in javascript.
Stars: ✭ 341 (+752.5%)
Mutual labels:  formula, excel, spreadsheet
Handsontable
JavaScript data grid with a spreadsheet look & feel. Works with React, Angular, and Vue. Supported by the Handsontable team ⚡
Stars: ✭ 16,059 (+40047.5%)
Mutual labels:  excel, spreadsheet
exoffice
Library to parse common excel formats (xls, xlsx, csv)
Stars: ✭ 31 (-22.5%)
Mutual labels:  parse, excel
xlsx-calc
javascript nodejs excel formula parser
Stars: ✭ 83 (+107.5%)
Mutual labels:  formula, excel
Angular Handsontable
Angular Data Grid with Spreadsheet Look & Feel. Official Angular wrapper for Handsontable.
Stars: ✭ 175 (+337.5%)
Mutual labels:  excel, spreadsheet
Excel2Object
excel convert to .NET Object | Excel与.NET 对象进行转换,支持公式、多Sheet等功能
Stars: ✭ 35 (-12.5%)
Mutual labels:  formula, excel
OpenWebSheet
OpenSource Web based spreadsheet
Stars: ✭ 30 (-25%)
Mutual labels:  formula, spreadsheet
Psexcel
A simple Excel PowerShell module
Stars: ✭ 234 (+485%)
Mutual labels:  excel, spreadsheet
Seatable
SeaTable: easy like a spreadsheet, powerful like a database
Stars: ✭ 231 (+477.5%)
Mutual labels:  excel, spreadsheet
ToolGood.Algorithm
Support four arithmetic operations, Excel formulas, and support custom parameters. 支持四则运算、Excel公式语法,并支持自定义参数。
Stars: ✭ 77 (+92.5%)
Mutual labels:  formula, excel
Excel to code
Roughly translate some Excel spreadsheets to Ruby or C.
Stars: ✭ 214 (+435%)
Mutual labels:  excel, spreadsheet
Yii2 Export
A library to export server/db data in various formats (e.g. excel, html, pdf, csv etc.)
Stars: ✭ 153 (+282.5%)
Mutual labels:  excel, spreadsheet
Documentserver
ONLYOFFICE Document Server is an online office suite comprising viewers and editors for texts, spreadsheets and presentations, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
Stars: ✭ 2,335 (+5737.5%)
Mutual labels:  excel, spreadsheet
react-datasheet-grid
An Airtable-like / Excel-like component to create beautiful spreadsheets.
Stars: ✭ 227 (+467.5%)
Mutual labels:  excel, spreadsheet
Hyperformula
A complete, open-source Excel-like calculation engine written in TypeScript. Includes 380+ built-in functions. Maintained by the Handsontable team⚡
Stars: ✭ 210 (+425%)
Mutual labels:  formula, spreadsheet

Spreadsheet

TypeScript/javascript spreadsheet parser, with formulas. For a full list of formulas, see DOCS.md.

Usage

Install

npm install js-spreadsheet

Examples

Using a Sheet

var Sheet = require("js-spreadsheet").Sheet;
var sheet = new Sheet();
sheet.setCell("A1", "10");
sheet.setCell("A2", "14");
sheet.setCell("A4", "10e2");
sheet.setCell("A5", "99.1");
sheet.setCell("B1", "=SUM(A1:A5)");
sheet.getCell("B1").getValue(); // returns: 1123.1

Using Formulas Directly

var Formulas = require("js-spreadsheet").AllFormulas;
Formulas.SUM(1, 2, 3, [4, 5, 6], "7"); // returns: 28

For a full list of formulas, see DOCS.md

Nested Formulas

sheet.setCell('A1', '=SIN(PI() / 2)')
sheet.getCell("A1").getValue(); // returns: 1

Date Conversion

sheet.setCell('A1', '=DATEDIF("1992-6-19", "1996-6-19", "Y")')
sheet.getCell("A1").getValue(); // returns: 4

Number Parsing

sheet.setCell('A1', '="10e1" + 44');
sheet.getCell("A1").getValue(); // returns: 144

sheet.setCell('A2', '="1,000,000" + 1');
sheet.getCell("A2").getValue(); // returns: 1000001

sheet.setCell('A3', '="-$10.00" + 0');
sheet.getCell("A3").getValue(); // returns: -10

sheet.setCell('A4', '=10% + 1');
sheet.getCell("A4").getValue(); // returns: 1.1

sheet.setCell('A5', '= 2 ^ 10');
sheet.getCell("A5").getValue(); // returns: 1024

Ranges

In MS Excel, and Google Spreadsheets, literal ranges are denoted with opening and closing curly-brackets. E.g. "{1, 2, 3}". In this implementation however, literal ranges are denoted with opening and closing brackets. E.g. "[1, 2, 3]".

// OK
sheet.setCell('A1', '=SUM([1, 2, 3])');
// NOT OK
sheet.setCell('A1', '=SUM({1, 2, 3})');

Docs

See DOCS.md for full list and documentation of all formulas available.

Contributing

When adding a formula, or fixing a bug please follow the commit message format:

[BUG_FEATURE_FILE_OR_COMPONENT] short description here of issue and fix

If you're adding a new formula, before you submit a pull request or push ensure that:

  1. The formula is tested inside the proper category file in tests/Formulas.
  2. Make sure the formula is exported, and imported/exported in AllFormulas.ts.
  3. The formula tests for reference errors, N/A errors, value errors for each input.
  4. That the formula is tested for parsing inside SheetFormulaTest.ts.
  5. Run tests with npm run test.
  6. Build with npm run build.
  7. Build DOCS.md with npm run docs.

Why?

Near the end of 2016 I began to ask myself why I didn't know more about MS Excel and Google Spreadsheets. Why didn't I know more about the most popular programing language in the world? I began to reverse engineer Google Spreadsheets in particular, gaining a better understanding along the way.

I chose TypeScript because, coming from Java, it is really nice to be able to see type errors, and catch them. I also just enjoy getting specific with my return types, even if the specifications for a spreadsheet treat type flexibly.

For the formula documentation, I tried to be at least -- if not more -- thorough as Google Spreadsheets.

License

For this repository's code license, and related licenses, see LICENSES directory.

Acknowledgements

This is largely a re-write of Handsontable's https://github.com/handsontable/ruleJS, and https://github.com/sutoiku/formula.js/. The parser was derived from Handsontable's, and many of the formulas were created with FormulaJS's formulas as a reference point.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].