Skip to content

mP1/walkingkooka-spreadsheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Coverage Status License Language grade: Java Total alerts J2CL compatible

Composition

A web based spreadsheet application. This project while central also includes features and more from other sister projects github.

  • The react contains a pure web client with little if any spreadsheet logic.
  • The server contains the many REST APIs (all json), which forward requests to services within this project. This project takes care of http/network/json type stuff.

Tests

There are automated tests for all areas or components within the spreadsheet including related and dependent projects of which there are many. These are mentioned first because they illustrate the care and features available and also provide an example of the API usage.

  • Helpers (interfaces with default/defender methods) are provided for basically all interfaces, think mixins.
  • Helpers include numerous methods so tests concentrate on data, logic and not boilerplate.
  • Mocks and fakes are also provided for all interfaces.
  • Helpers include informative messages and asserts to ensure correctness, and pretty printed messages and context upon failures
  • Since most interfaces are SAM or contain at most a few methods its quite simple to implement if necessary.

Global settings (Metadata)

  • All global like settings are captured and not hardcoded SEE.
  • The user can change each and every one of these settings or values including the decimal point, locale and more and they are honoured.
  • The react web app include numerous cypress integration tests that demonstrate updating of this global metadata and instant feedback such as cells being updated with new locale settings etc.
  • User selectable support for double (fast, lower precision, less memory) or java.math.BigDecimal (slower, user selectable precision, more memory).
  • User selectable rounding, precision support.
  • The SpreadsheetMetadata class captures many properties/settings and makes for an interesting read to get a deeper understanding of internals.

Functions

  • Many functions (just under 100) have been implemented but many remain. tree/functions for more info.
  • Work remains to create projects to host other categories of functions such as: banking/finance etc.
  • Ideas include the support of user/3rd party/open source functions which would execute within a sandbox.

Storage

  • Interfaces are defined for storage of all artifacts within a spreadsheet, including but not limited too cells, label & range definitions and more.
  • Possible ideas may be separated into two broad categories of storage, read only and read/write.
  • Examples of read/write include memory (DONE), RDBMS TODO
  • Other forms of read only Storage would allow mixture of numerous data sources
  • A CSV, TSV or XML file (uploaded, a network path, url) could provide a table like range, Rules would be implemented to update a local (server) cache copy.
  • Same idea as for the previous read only files but for a table within a web page.

Formatting

  • Support for text, numbers, dates, date/time, time including honouring of spreadsheet set localization completed.
  • Formatting numbers as fractions TODO
  • Conditional formatting is also supported.

Data Validation

  • Minimal work has been done in this area.
  • This is another area where support for 3rd party plugins executed within a sandbox would help enable users to truely customise their experience and data security.

Security

  • Security and permissions remain outstanding.

Comments / Multi-user

  • Comments for individual cells or ranges TODO
  • Chat like features.
  • Multi user support should be possible as each API call currently supports returning all related updated cells.

A lot has been done and a lot remains, the README and issues for each project are ideal starting grounds to discover progress and features.

A working sample that demonstrates a working engine that creates 2 cells, one referencing the value of the other and evaluates the formula of both. All other spreadsheets are supported, such as a conditional format, labels and more. The above link has the full sample.

final SpreadsheetCellStore cellStore = cellStore();
final SpreadsheetLabelStore labelStore = SpreadsheetLabelStores.treeMap();

final SpreadsheetEngine engine = engine(cellStore, labelStore);
final SpreadsheetEngineContext engineContext = engineContext(engine, labelStore);

engine.saveCell(SpreadsheetCell.with(SpreadsheetCellReference.parseCell("A1"), SpreadsheetFormula.with("12+B2")), engineContext);

final SpreadsheetDelta delta = engine.saveCell(SpreadsheetCell.with(SpreadsheetCellReference.parseCell("B2"), SpreadsheetFormula.with("34")), engineContext);

final Set<String> saved = delta.cells()
        .stream()
        .map(c -> c.formula().value().get().toString())
        .collect(Collectors.toCollection(Sets::sorted));

// a1=12+b2
// a1=12+34
// b2=34
assertEquals(Sets.of("46", "34"), saved);

About

Building a web based spreadsheet application server & rich web app

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages