Download it now!
Bug 31831 - Calc spreadsheet do not preserve formulas when you copy sheet
Summary: Calc spreadsheet do not preserve formulas when you copy sheet
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.3.0 Beta3
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
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:


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

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:
=VLOOKUP($A11;'10'.$A$1:$O$200;9;0)

will change to

=VLOOKUP($A11;'SVI MJESECI NEMJENJAJ'.$A$1:$O$200;9;0)

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
Hi,

It's not a bug. You used relative sheet reference.
=VLOOKUP($A11;'10'.$A$1:$O$200;9;0)

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

=VLOOKUP($A11;$'10'.$A$1:$O$200;9;0)
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! :)