Bug 31831 - Calc spreadsheet do not preserve formulas when you copy sheet
Summary: Calc spreadsheet do not preserve formulas when you copy sheet
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected)
3.3.0 Beta3
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
Depends on:
Reported: 2010-11-22 00:21 UTC by Mikeyy - L10n HR
Modified: 2010-11-22 12:45 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:

Test sheet for sheet copy bug (354.02 KB, application/vnd.oasis.opendocument.spreadsheet)
2010-11-22 00:21 UTC, Mikeyy - L10n HR

Note You need to log in before you can comment on or make changes to this bug.
Description Mikeyy - L10n HR 2010-11-22 00:21:41 UTC
Created attachment 40469 [details]
Test sheet for sheet copy bug

Problem is that if I have few sheets in one document which are linked and pulling data from each other, when I copy sheet it doesn't preserve data source in formulas.

In attachment you will find document which uses VLOOKUP to get certain data from other sheets. Try to make copy of first sheet via right clicking on sheet name and choosing "move/copy sheet" option. Then you leave everything as it is, you just mark "COPY" checkbox at bottom and click OK.

With pink I marked rows in which formula data source will change.

For example, original formula from cell F11:

will change to


As you can see, data source changed from sheet '10' to sheet 'SVI MJESECI NEMJENJAJ' which is first sheet on the left from old '10' sheet.

On a sheet copy everything should stay same...
Comment 1 GerardF 2010-11-22 07:46:15 UTC

It's not a bug. You used relative sheet reference.

add $ in front of the sheetname and it will works.

Comment 2 Mikeyy - L10n HR 2010-11-22 11:03:44 UTC
I know there is workaround for this with $ sign, but isn't it illogical if you want COPY of sheet for program to automaticly change data refrences?
I want exact copy of sheet with slitly different sheet name.

Call it feature request if you want then! :)