Page 1 of 1

[Solved] Duplicate a sheet with a chart

Posted: Thu Dec 30, 2021 6:28 pm
by Howardofski
I created a sheet for JAN that includes a chart for JAN, then I selected the entire sheet (every cell) and copied it to a new sheet for FEB. However the chart refuses to copy properly and has strange formatting errors. Then, when I save the document and reopen it, the chart on the copied (FEB) sheet is totally wrecked. It appears that I do not know how duplicate a sheet with a chart.

Thanks for any clues.

Re: I don't know how to duplicate a sheet with a chart

Posted: Thu Dec 30, 2021 6:46 pm
by MrProgrammer
Howardofski wrote:I don't know how to duplicate a sheet with a chart
Edit → Sheet → Move/Copy works for me. The new sheet contains its own independent chart. If you need any further assistance, attach a document demonstrating the difficulty (remove confidential information then use Post Reply, not Quick Reply, and don't attach a picture instead of the document itself). Explain what steps you are taking and how the result of those steps differs from your expectation.
Howardofski wrote:I selected the entire sheet (every cell) and copied it to a new sheet for FEB.
The chart is not contained in a cell. The chart's data is in cells, but the chart itself is not.

Creating Charts and Graphs contains much valuable information about how to use charts in Calc. It is a mistake to attampt to use charts without reading that material.

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the subject field. Select the green checkmark icon at the same time.

Re: I don't know how to duplicate a sheet with a chart

Posted: Thu Dec 30, 2021 8:56 pm
by Lupp
Howardofski wrote:... I selected the entire sheet (every cell) and copied it to a new sheet ... However the chart refuses to copy properly and has strange formatting errors. ...
I don't undertstand the "strange formatting errors", but...

After 'Select All' (Ctrl+A) actually also the shapes of a sheet, among them the shapes hosting charts, are selected and get transfered to an intermediary representation by 'Copy' (Ctrl+C).
Using 'Paste' now in a new blank sheet (A1 has focus), everything may seem as expected first, but as soon as you change any data, you will see that the chart doesn't update. It is no longer connected to the data range(s), but keeps its own data in internal tables.

This behaviour of charts under Copy/Paste isn't described in the linked guide.

Copying the complete sheet via the context menu of its tab, item 'Move/Copy Sheet ...' (as MrProgrammer alredady suggested) will avoid the described issue. The data range(s) are re-directed as needed.

BTW: Recent LibreOffice Calc supports reconnection of copied charts to data ranges.

Re: I don't know how to duplicate a sheet with a chart

Posted: Thu Dec 30, 2021 9:41 pm
by Howardofski
Thanks Mr. Programmer and Lupp. I was unable to find any information in the guide (as noted by Lupp), Then I was unable to get the copy/move process (as described by Lupp) to work.

But then I discovered a work-around as follows. Copy and paste the whole sheet to a new sheet that has a new name. Close and reopen the document (otherwise the new chart cannot be edited). In the previous (original) sheet, copy the "data range" of the chart. In the new sheet, paste the data range in for the new chart and edit the name to match the name of the new sheet. That finally worked.

Thanks again for your help.

Re: I don't know how to duplicate a sheet with a chart

Posted: Fri Dec 31, 2021 5:49 pm
by Mountaineer
Then I was unable to get the copy/move process (as described by Lupp) to work.
As I met several people, who never used a context menu:
At the bottom of the page/calc window the sheets of your file are shown as Tabs.
You reach the context menue by selecting the right button of your mouse while the cursor in overbthe name if your tab (Sheet1 or maybe Jan).

Then you have to select "Copy/move sheet" or something similiar, as I use LO and no english locale.

Make sure the dialog is on copy, not on move and select where to put the copy.

If this wont work, please tell, wich step is not working .

J.

Re: I don't know how to duplicate a sheet with a chart

Posted: Fri Dec 31, 2021 6:08 pm
by Howardofski
Mountaineer, it worked. I was failing to check "copy", having been educated by the government. Thanks very much for your help.