Bug 88749 - Edit>Delete Contents should not allow to delete Pivot Table
Summary: Edit>Delete Contents should not allow to delete Pivot Table
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: Other All
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Pivot-Table
  Show dependency treegraph
Reported: 2015-01-23 14:55 UTC by Pedro
Modified: 2021-01-02 03:45 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

Sample spreadsheet containing a non-visible Pivot Table (21.34 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-01-23 14:57 UTC, Pedro

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro 2015-01-23 14:55:27 UTC
Under LibreOffice (at least 4.2.8 and higher, didn't test earlier) the user can not delete rows, columns or cells containing a Pivot Table (unlike Excel).

It is not a bad idea to restrict this operation to the option Data > Pivot Table > Delete

However if the user doesn't know that and after failing to delete Rows, Columns or Cells (which popup a IMO incomplete warning), then resorting to Delete Contents does _apparently_ work.

In the attached file a Pivot Table was created starting at cell B10 and then was deleted using Edit>Delete Contents

The problem is that the Pivot Table although not visible is "still there".

This can easily be proven by 
1) trying to delete Rows 10 to 15 
2) by clicking on any cell in the range B10 to F15 and selecting Data > Pivot Table > Create
3) right click on any cell in the range B10 to F15 and click on Refresh

So the suggestions are
a) When the user tries to delete a range containing a Pivot Table using Edit>Delete Contents popup the same warning as for Delete Rows, Columns or Cells

b) Improve the error message by mentioning that "To remove a Pivot Table use option Data > Pivot Table > Delete or right click on the Pivot Table and select Delete"
Comment 1 Pedro 2015-01-23 14:57:22 UTC
Created attachment 112722 [details]
Sample spreadsheet containing a non-visible Pivot Table
Comment 2 raal 2015-01-23 21:58:07 UTC
I can confirm with Version:
Build ID: 60143f4f7bc50054dcef923218b8c7c3bc154933
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-01-21_04:58:34
Comment 3 QA Administrators 2016-09-20 09:37:07 UTC Comment hidden (obsolete)
Comment 4 Pedro 2016-09-29 14:49:23 UTC
The problem is still present in

This is somewhat a regression. In version 4.0.6 deleting the rows actually removes all the Pivot Table. But selecting a single row within the Pivot range would delete the line converting the Pivot to a regular table (which is not expected).

There are two problems here: 1) Delete Contents (currently Clear Contents) should not hide the Pivot Table but effectively Clear all cell content; 2) If the range selected includes a Pivot Table then Clear or Delete Rows or any other insert/delete function should a) take effect if the whole table is selected or b) it should show the error message "You cannot insert or delete cells when the affected range intersects with pivot table." if only a part of the Pivot Table is selected

This is what happens in Excel and is a logical result.
Comment 5 QA Administrators 2017-10-23 14:15:28 UTC Comment hidden (obsolete)
Comment 6 Pedro 2017-10-24 09:27:24 UTC
Yes, this bug still occurs in LO 5.3.6 and 5.4.2 under Windows 7.
Comment 7 elicoten 2018-01-01 16:43:12 UTC
I have a similar problem where I pasted some data from Google Spreadsheets and now there are some cells which it won't let me delete with the error

"You cannot insert or delete cells when the affected range intersects with pivot table."

I don't think there is currently a pivot table in the source spreadsheet where I copied and pasted from (it's possible there was one there that was deleted/moved) but now Calc seems to think there's a pivot table in rows 2-6 and won't let me delete any of the rows. I have tried clearing contents and then deleting the rows but still get the same error.

I can't see any pivot table in my Calc spreadsheet.
Calc Version: on Ubuntu.
Comment 8 QA Administrators 2019-01-02 03:34:25 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2021-01-02 03:45:28 UTC
Dear Pedro,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team