Broken "Copy only visible cells" extension for Calc version

The Calc extension “Copy only visible cells” is not working in LibreOffice (on both Kubuntu 14.04 and 16.04). It gives the error message “Filled cells cannot be shifted beyond the sheet.”

I looked at the macro and don’t see what needs to be changed and I’m not sure how to contact whoever wrote the extension. (Edit: I e-mailed the last person to modify the code. The information was at the top of the macro and I had not scrolled all the way up earlier.)

As a work-around, I figured out that I could use filters to replace part of the functionality the extension provides (excluding rows), but not all of it (excluding columns).

If anyone has any ideas on how to get the functionality of copying only visible cells, I would appreciate some input.


Thank you VERY MUCH for this simple fix. I use this function a lot and was getting frustrated with libre 5. A great help

You’re welcome. I’m glad I could help!

After digging through the macro for a while, I found an answer to the problem. LibreOffice 5+ changed how it deals with shifting cells when pasting.

On line 31, the macro “CopyOnlyVisibleCells” says:

arrayPropPaste(5).Value = 4

The “4” needs to be changed to a “6”. Line 31 should read:

arrayPropPaste(5).Value = 6

→Tools→Macros……Basic macros……→→My Macros→selVisiCells…

Thank you very much! Now it is working as it should!

I e-mailed Gustavo Pacheco (the guy who has been maintaining the extension). He made the change and uploaded it as version 1.2.


I just installed version 1.2. But I still get the same error “Filled cells cannot be shifted beyond the sheet.” - Anyone has a clue? I’m using OSX 10.11.6, LibreOffice

Hello there! thanks for the information. Can someone upload the .oxt file with modification? Since I have the .oxt file of the version 1.1 but I dont know how to modify it in order to change the value at line 31.

Thanks in advance