handsontable / hyperformula

HyperFormula is an open-source headless spreadsheet for business web apps. It comes with over 400 formulas, CRUD operations, undo-redo, clipboard support, and sorting.
https://hyperformula.handsontable.com/
Other
1.97k stars 108 forks source link

[Bug]: Copying and pasting formulas pastes the value and not the formula #1418

Closed opike closed 2 months ago

opike commented 3 months ago

Description

According to the documentation, relative cell references in formulas should be updated when copying and pasting: https://hyperformula.handsontable.com/guide/cell-references.html#relative-references

However this is working for me - please seen screencast and demo link (you can type the formula "=A1" into cell E1 and then do a copy/paste).

Video or screenshots

https://d.pr/i/wmueym

Demo

https://codepen.io/opike99/pen/dyEBQWj

HyperFormula version

2.7.0

Your framework

No response

Your environment

Chrome 126.0.6478.127 MacOS 14.4.1

adrianszymanski89 commented 3 months ago

Hi @opike

Thank you for contacting us. This operation will work if you use HyperFormula copy/paste methods: https://hyperformula.handsontable.com/guide/clipboard-operations.html#copy. The issue in your example is caused by the fact that Handsontable can't copy raw formulas, only the visual content of the cells.

sequba commented 2 months ago

Closing this issue because it is not a HyperFormula bug.

The behavior of Handsontable's copy-paste mechanism on formula cells is implemented in the Handsontable project.