jspreadsheet / jspreadsheet/ce

Cell references using dollar sign cause an error when writing a formula

Open
#921 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
7.2k
Forks
890
PR merge metrics
No merged PRs in 30d

Description

When you create a formula and drag it across a row or down a column, the cell references increment in relationship to the location of the cell. This behaviour is consistent in both Excel and jExcel. However, Excel has a feature that allows you to specify that you don't want the cell reference to increment by placing a dollar sign in front of the row and/or column reference. Thus you can specify a constant to be used on all the formulae in a row or column. This type of formula causes an error in jExcel.

That is to say, this works: 'A3 + B3', but this causes an error: '$A$3 + B3'.

Could a future release support the dollar sign in writing a formula?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named in the issue. Reproduce the failure with the formulas A3 + B3 and $A$3 + B3, then trace the formula-writing path in the JavaScript spreadsheet code. Done means formulas containing dollar-sign row or column references are accepted without an error and retain the intended fixed references.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.