How do I copy a sheet with charts so they update with new data

If I have a sheet with a lot of data and some charts, I want to copy that and paste in new data so that the charts reflect the new data. I thought this used to work, but now I find the charts in the copied sheet still take their data from the original sheet or they have some sort of internal data** which doesn’t relate to the data in any sheet.

I know copying just the chart it will still take it’s data from the original location but I thought copying a sheet with its chart was different.

Is there a way to copy a sheet with charts so the charts use the data in the copied sheet?

** it seems simple charts copied from one file to another arrive using the data in the new file but more complicated charts (mine have multiple x-ranges) arrive with this internal data table.

6.4.6.2 x64 on Win10 2004

Hello

Use your operating system to duplicate the file.

Then update the data in the new file by copt and paste via LO.

Kind regards, Michel

Yes, that’s bound to work but ideally I’d like a series of sheets in one file so I would then have to copy/move them which creates the same issues with internal data.

You can copy the entire sheet, and paste it into another document. If you select the cells that encompass the data and the chart, you shouldn’t have a problem either.

You can try with secondary click on the sheet tab, select Move or Copy sheet..., check Copy, and select Location.

The problem arises when you copy the graphic separately.

See LibreOffice Help on Move or Copy a Sheet.

Tested with LibreOffice 6.4.7.2 (x86); OS: Windows 6.1.


Add Answer is reserved for solutions.

Press edit below your question if you want to add more information; also can comment an answer.

If you think the answer is not satisfactory, add a comment below, or click edit (under your question) to add more information.

Thanks but Move or copy sheet does not work, either within the same file or copying to a new file. That’s what I’ve been doing. Just tried copy entire sheet (Ctrl-A, Ctrl-C) and paste into a new blank file and that doesn’t work, either - all my charts are reduced to internal data. (6.4.6.2, Win10 x64).

Can you share a sample file? Make a copy of your file, edit all sensible data previously, press edit below your question and use the paper clip to upload a file.

I think this may be a bug. If I copy a sheet internally within a file which contains only one sheet it works just as I would expect. A second internal copy also works. But in a file with 11 sheets, copying one of them to make an extra sheet does not work - the charts refer back to the sheet that was copied. I’ll see if I can narrow it down.

Later: if I copy a sheet to the last position it works fine. If I copy it to some other position not only does it pick the wrong data for its charts, it screws up the other sheets. A workaround seems to be to always do the Copy to the last position then drag the tab back to where you want it. I’ll narrow it down some more and file a bug.

@grahamh, Using the sample file you uploaded at fdo#135821 I couldn’t repeat the issue; copying 11 times before other sheets.

This often works as expected - charts refering to data in the sheet containing them. But under certain conditions it doesn’t work. See https://bugs.documentfoundation.org/show_bug.cgi?id=135821

I will update this if I find a workaround better than copying the file in the OS.