Skip to content

Issue with copying cells #298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
muscapades opened this issue Apr 3, 2017 · 2 comments
Closed

Issue with copying cells #298

muscapades opened this issue Apr 3, 2017 · 2 comments

Comments

@muscapades
Copy link

muscapades commented Apr 3, 2017

See pull request #297 with three failing tests.

We see a problem where cells that are copied as a block does not appear to have formulas, only values.

I suspect that Excel has some way of saving "similar cells" that exceljs does not understand?

The attached fibonacci.xlsx has the problem. Rows 1-3 where created by hand.
Rows 4 to 19 where created by copying A3:B3 in one copy-paste operation.

The first row in the new block, A4:B4, is fine.

All the rest of the rows, A5:B19, appear in exceljs to have only values, not formulas.

I can reproduce this problem by copying blocks of cells in other spreadsheets too. The first row is okay, the rest shows the problems.
Copying the rows one by one is a workaround, but not reliable. (A sheet created like this worked, but then when I added a range name to a cell, many cells now start showing the problem again.)

@nehakseth
Copy link

Was working on something similar and got stuck here. Few cells with formula just turn out to be an object which has formula which messes my calculations. Early help is appreciated.

@muscapades
Copy link
Author

I have submitted a suggested fix with a new ValueType.SharedFormula and information about what cell to adapt the formula from.
Another angle would be to create the adapted formula and let exceljs pretend that the formula was there all along.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants