Link: https://harshitverma001.github.io/Excelsior
- Value is inserted in the cell
- Value can be cut, copied or pasted
- Formula is written by user in the formula bar for evaluation
- Formula is evaluated by extracting the parent and child cells
- This creates a dependency graph which tells the order of value updation
- Implement cycle detection algorithm using DFS to detect the cycle incase it is present
- User can save the current work on website using local storage provided by the browser
- If sheet is saved by user, then next time all the values and formulas will be added to blank sheet when opened
→ Multiple Formatting Features to give the data the looks you desire.
-
Font Style and Font Size.
-
Alignment inlcuding left align, right align and center.
-
Bold, Italic and Underline the texts.
-
Custom Background Color and Text Color.
→ Address Bar and Formula Bar are added in this clone to provide better functionality and user experience.
-
Address Bar provides the user the address of the cell on which user is currently working on.
-
Formula Bar provides the user access to evaluate ALL BASIC MATHEMATICAL operations on one or more cells.
A completely offline JavaScript-based SpreadSheet program. It has been written with pure(stock) JS. No additional 3rd party API or framework/library has been used. I have commented on every major logic's code block in this program.
It is designed in a way that it can automatically create 2600 cells(A-Z Columns and 1-100 Rows) and give a unique ID to each cell. Then this IDs have been used in the cell reference feature. It supports calculation from direct expression and cell reference and also supports all basic excel formulas(including 'if' formula). It supports value auto-update(re-calculation of all expressions whenever the user changes referenced data.)
By default, this program automatically generates A-Z columns and 1-100 rows (2600 cells), but you can change it from inside the code. It also supports cell reference (eg '=a1+5' here a1 is referencing cell A1 ). It also supports formulas, I have tried to include all common formulas. So you will find most formulas predefined. But you can also create your own functions/formulas using native JavaScript code. In fact, not only formulas but also variables, arrays, objects, and almost anything can be created and used later.
- Case 1
- Input - Value is added with no formula
- Output - Value is shown in the cell
- Case 2
- Input - Formula is added with no value
- Output - The formula is evaluated and corresponding cells gets updated
- Case 3
- Input - Value and formula both are added
- Output - First, the value is shown in the cells. Then, formula is evaluated on these new values and corresponding cells gets updated