Bug 36466 - Add option to Select Visible Cells Only (to be copied from or copied to)
Summary: Add option to Select Visible Cells Only (to be copied from or copied to)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: high enhancement
Assignee: Tünde Tóth
URL: https://help.libreoffice.org/Calc/Onl...
Whiteboard: feature target:7.2.0
Keywords:
: 71518 115889 125185 125731 130052 (view as bug list)
Depends on:
Blocks: Calc-Enhancements Calc-Cells Cut-Copy
  Show dependency treegraph
 
Reported: 2011-04-21 09:27 UTC by Lito Macatunao
Modified: 2021-08-08 14:16 UTC (History)
19 users (show)

See Also:
Crash report or crash signature:


Attachments
Diff to enable selecting columns too (980 bytes, patch)
2021-02-22 15:21 UTC, Tomaz Vajngerl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lito Macatunao 2011-04-21 09:27:13 UTC
Please create a functionality wherein we can just select and copy the visible cells only just like in MS Office wherein you just have to:  EDIT==> GO TO==>  SPECIAL==>  VISIBLE CELLS ONLY

Please fix this, thanks!
Comment 1 Muthu 2011-05-04 23:15:44 UTC Comment hidden (obsolete)
Comment 2 Kohei Yoshida 2011-05-05 07:23:17 UTC
(In reply to comment #1)
> One for kohei? -> requirements.
> 
> Also a candidate for easyhacks.
> 
> Starting point: ScViewFunc::CopyToClip(...) in viewfun3.cxx

Well, not exactly.  This feature request calls for *selecting* only visible range, so we shouldn't modify the copy behavior directly but provide a means to select specific cell range.  FWIW Excel's "go to" functions (not just this one) are something we are missing entirely, so that's something we should consider as new features.
Comment 3 Gustavo Pacheco 2011-09-07 17:26:22 UTC
@Lito Macatunao

You can try the 'Copy only visible cells' extension as a *workaround*:
http://extensions-test.libreoffice.org/extension-center/copy-only-visible-cells

It is *not a definitive solution* but may helps you. Any comments, contact me at the extension webpage (for example, to add your language in the extension).
Comment 4 Björn Michaelsen 2011-12-23 12:02:36 UTC Comment hidden (obsolete)
Comment 5 Björn Michaelsen 2011-12-23 12:57:24 UTC Comment hidden (obsolete)
Comment 6 Florian Reisinger 2012-05-18 09:44:42 UTC Comment hidden (obsolete)
Comment 7 Mirosław Zalewski 2013-08-16 21:16:29 UTC Comment hidden (obsolete)
Comment 8 Björn Michaelsen 2013-10-04 18:47:01 UTC Comment hidden (obsolete)
Comment 9 Kevin Suo 2014-04-25 15:22:07 UTC
*** Bug 71518 has been marked as a duplicate of this bug. ***
Comment 10 Gerry 2015-07-21 07:35:19 UTC
From my observations of LO Calc users, copying VISIBLE CELLS ONLY is a basic feature for a spreadsheet, which many people really miss. 

Therefore, I would like to ask the developer team, whether it is possible to include the extension "Copy only visible cells" in the core LibreOffice software.

http://extensions.libreoffice.org/extension-center/copy-only-visible-cells

I think this inclusion of this small feature is justified, because users perceive this as core functionality and even don't get the idea themselves that this small feature might be supplied by an extension. Thanks!
Comment 11 Robinson Tryon (qubit) 2015-12-14 07:01:31 UTC Comment hidden (obsolete)
Comment 12 Eike Rathke 2016-01-26 17:37:33 UTC
This is not an EasyHack, removing keyword.
Comment 13 Dietrich Schulten 2017-04-01 10:59:36 UTC Comment hidden (obsolete)
Comment 14 Roman Kuznetsov 2017-10-22 17:50:49 UTC
(In reply to Dietrich Schulten from comment #13)
> Since LO 5.2 the CopyVisibleCells extension no longer works for subtotals,
> it copies the formulas, not the formula results, and when pasting the copy,
> the formulas are broken.
> 
> Please consider to make this a native feature.

Gustavo fixed this problem and made extension version 2.0. It works fine now. But would't be cool if developers will include this functional in LibreOffice
Comment 15 Timur 2018-04-02 09:08:43 UTC
*** Bug 115889 has been marked as a duplicate of this bug. ***
Comment 16 Timur 2019-05-13 13:09:20 UTC
*** Bug 125185 has been marked as a duplicate of this bug. ***
Comment 17 Timur 2019-05-13 13:14:01 UTC
I changed the title for an option from "Copying Visible Cells Only" to "Select Visible Cells Only". Similar to comment 2. 
Gustavo's extension is nice and useful but I thing wrong in that it copies and not selects. Sometimes we need visible range as a destination. Paste should always be same and selecting doubles the usefulness. So I hope to have version 3 of the extension.
Comment 18 Roman Kuznetsov 2019-06-06 19:22:58 UTC
*** Bug 125731 has been marked as a duplicate of this bug. ***
Comment 19 kabilo 2019-06-06 20:14:41 UTC
I agree with Timur (comment 17), I also think that the select of visible cell is a better option. Thanks
Comment 20 Xisco Faulí 2019-11-29 13:29:26 UTC Comment hidden (obsolete)
Comment 21 Timur 2020-01-17 14:29:02 UTC
*** Bug 130052 has been marked as a duplicate of this bug. ***
Comment 22 Axel Braun 2020-01-17 16:01:02 UTC
(In reply to Xisco Faulí from comment #20)
> Changing priority back to 'medium' since the number of duplicates is lower
> than 5

Now it is 5....and the issue is 9 (!) years old
Comment 23 thatho 2020-02-13 10:22:04 UTC
I'd like to add my vote for it.
Comment 24 László Németh 2021-02-17 12:24:20 UTC
Fixed for the cells for the hidden rows by the new option
Edit->Select->Select Visible Cells Only

I suggest to separate handling of hidden rows and
hidden columns via the following menu options:

Select Visible Rows Only
Select Visible Columns Only
Select Visible Cells Only
Comment 25 László Németh 2021-02-18 09:40:53 UTC
(In reply to László Németh from comment #24)
> Fixed for the cells for the hidden rows by the new option
> Edit->Select->Select Visible Cells Only
> 
> I suggest to separate handling of hidden rows and
> hidden columns via the following menu options:
> 
> Select Visible Rows Only
> Select Visible Columns Only
> Select Visible Cells Only

Tünde has reported, that it's not possible to select the combination. So it's better to use only

Select Cells of Visible Rows
Select Cells of Visible Columns

or adding only the more frequent first one, as originally implemented by Tünde.
Comment 26 Timur 2021-02-18 11:33:42 UTC
Hi. Any solution would be an improvement but I don't understand this that combination cannot be selected. 
I tested Gustavo extension and it seems to handle all cells in a range with both rows and columns hidden.
Comment 27 Roman Kuznetsov 2021-02-19 09:36:41 UTC
for me we got a very strange implementation :

1. It just doesn't work for me now.

2. I would prefer only ONE menu item "Copy only visible cell" at once without any intermediate actions.
Comment 28 Timur 2021-02-19 10:34:06 UTC
Roman, I don't get it. I asked for Select not Copy because of cut. And it should be in Edit-Select. I guess it's still not implemented so I tested with extension.
Comment 29 Tomaz Vajngerl 2021-02-22 15:20:18 UTC
The problem is not that it is not possible to select but that it is not possible to copy. 

For example:
- go into Calc and make a multi row and column selection
- from that selection remove one column in the middle and one row in the middle

This is the exact situations you get when you have hidden rows and columns. 

If you try to copy that you will get a pop-up dialog "This function cannot be used with multiple selections." I guess it is a fundamental limitation in Calc and not that easy to solve.

OTOH... it is not "Select Visible Cells Only" problem that copying doesn't work. For example if we run any other action on the selection like "clear content", "delete" or change the background color, it works as expected.

BTW. I modified the code to do the selection of cols too... I will attach the diff.
Comment 30 Tomaz Vajngerl 2021-02-22 15:21:05 UTC
Created attachment 169967 [details]
Diff to enable selecting columns too
Comment 31 Commit Notification 2021-02-25 15:50:14 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6ab08b3b1026a582352ea018b9d59e91d3e86d92

tdf#36466 sc UI: add new options to deselect hidden cells

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 32 Timur 2021-02-26 14:04:04 UTC Comment hidden (me-too)
Comment 33 Timur 2021-02-26 14:07:49 UTC
With thanks, I'd still like to see an explanation how Gustavo extension can copy visible cells from an area with both hidden row and column (situation from comment 29), in a single command.

Fix  makes 2 commands from Comment 25. If we have 3x3 cells with middle column abd row hidden, simply copy will make 3x3 cells, extension 2x2 cells and those two commands 2x3  or 3x2 cells.
Comment 34 Tomaz Vajngerl 2021-02-26 15:15:55 UTC
The extension copies the selection into a new sheet, then deletes the hidden rows and columns, then copies that. I'm sure there are cases this would fail dramatically with certain formulas... 

It is possible to have only one command as I described previously, because the problem is not with selection - selection can work fine for either rows or columns, but any attempt to copy or cut a selection range that has holes in columns AND rows would fail with an error message. That's just the limitation of copying in LibreOffice (which could be solved at some point - or at least solved for some cases).  

IMHO splitting this into 2 separate commands wasn't a solution I prefer.
Comment 35 NISZ LibreOffice Team 2021-03-08 14:43:11 UTC
Verified in:

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 72841008bf422dfd8553240b3a78f0474d03523c
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: threaded Jumbo
Comment 36 Julien Adetele 2021-03-17 23:59:13 UTC
The status bar keeps tracking the number of rows selected _before_ you click Edit->Select->Select Visible Rows Only 

Clicking that button should update the number of selected rows reported in the status bar, IMHO
Comment 37 Commit Notification 2021-03-29 08:22:52 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3453f2f8fce9e69cd9f2a2c6f3d7171b6e59f674

tdf#36466 sc: update status bar at Select Visible Rows

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 38 stragu 2021-08-08 14:15:51 UTC
Added to the release notes:

https://wiki.documentfoundation.org/index.php?title=ReleaseNotes/7.2&diff=376201&oldid=376070

Tünde: I've noticed that the status bar does update when using this new function, but it doesn't show anything in my case. (Instead of showing the updated number of rows and columns.)
Is that known?