[Solved] Duplicate a sheet with a chart

Discuss the spreadsheet application
Post Reply
Howardofski
Posts: 36
Joined: Thu Nov 18, 2021 5:52 pm

[Solved] Duplicate a sheet with a chart

Post 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.
Last edited by Hagar Delest on Sun Jan 02, 2022 8:46 pm, edited 1 time in total.
Reason: Tagged [Solved].
Open Office 4.1.11 Windows 10
User avatar
MrProgrammer
Moderator
Posts: 5472
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

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

Post 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.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
Lupp
Volunteer
Posts: 3761
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

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

Post 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.
On Windows 10: LibreOffice 25.8.4 and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
Howardofski
Posts: 36
Joined: Thu Nov 18, 2021 5:52 pm

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

Post 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.
Open Office 4.1.11 Windows 10
Mountaineer
Posts: 339
Joined: Sun Sep 06, 2020 8:27 am

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

Post 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.
LibreOffice 7.6 on Windows 10pro and other Versions parallel
Howardofski
Posts: 36
Joined: Thu Nov 18, 2021 5:52 pm

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

Post by Howardofski »

Mountaineer, it worked. I was failing to check "copy", having been educated by the government. Thanks very much for your help.
Open Office 4.1.11 Windows 10
Post Reply