Copy only visible cells

4.5
Moyenne : 4.5 (2 votes)
BrOffice.org

This extension provides an alternative to the 'Select Visible Cells' command in Microsoft Excel. It´s useful to use with subtotals or ranges with hidden columns or rows. To use the 'Copy only visible cells' function, do the following steps:

1. install the extension;
2. restart OpenOffice.org;
3. open your sheet with hidden rows or columns;
4. select a range;
5. insted the simple copy button, click in 'Copy only visible cells' button;
6. paste in your target document, for example, another sheet or a RTF text table. The hidden rows or columns won´t paste.

Notes:
1) it´s not possible paste especial with the 'DDE Link' option in Writer;
2) for ranges with filters (Data > Filter > AutoFilter) you can use the simple Copy.

Developed by Gustavo B. Pacheco, Brasil.
Special thanks: Andrew Pitonyak, Stephan Wunderlich, Ryan Nelson, Paolo Mantovani, Christian Junker and Comune di Bologna.

Télécharger l'extension
Système d'exploitation: System Independent
Version: 0.9.4
Date: 2010-sept.-13
Taille: 26.59 Ko
Licence: Opensource

Téléchargements: Aujourd'hui: 5 | Semaine: 24 | Mois: 92 | Année: 3,350

Commentaires

Two suggestions

Hello

First of all bravo for this work.

Two suggestions:

  • If I am not mistaken this program does not manage filtered data (Dated > Filter) because the selection (.RangeAddresses) returns a data array (message : This function cannot be used with multiple selections).

    If I'm right I think that it would be necessary to modify the text of presentation...

  • The procedure used to get back the language of the user does not work in case a packlang was installed (for example first installation of an English version, then a French packlang). The language is in fact fr

The code could be something like :


Sub initStrLocale as String
' inizializza l'array strLocale per la lingua
Dim OOLangue as string
Dim aConfigProvider
aConfigProvider = createUnoService("com.sun.star.configuration.ConfigurationProvider")
OOLangue = aConfigProvider.Locale.Language

' --
Select Case OOLangue
Case "pt" ' Brazilian Portuguese
strMsg(0) = "Esta função não pode ser utilizada com seleções múltiplas."
strMsg(1) = "BrOffice.org"
Case "en"
strMsg(0) = "This function cannot be used with multiple selections."
strMsg(1) = "OpenOffice.org"
Case "fr"
strMsg(0) = "Cette fonction est incompatible avec la sélection multiple."
strMsg(1) = "OpenOffice.org"
Case "es"
strMsg(0) = "Esta función no se puede aplicar con selecciones múltiples."
strMsg(1) = "OpenOffice.org"
End Select
End Sub

Best regards

Thanks for your suggestions!

Thanks py_samyn for your comments and I'm sorry for my long delay.

In fact, I have identified the problem of "multiple selections" of filtered data in some versions of OpenOffice.org based on Go-OO (I have tested in Mandriva and Ubuntu). I'm thinking about the solution... May be I'll compare the current selection with the range addresses in ThisComponent.DatabaseRanges(), and, if true, I'll use the simple copy in the code.

About the other problem, I found this issue:
http://www.openoffice.org/issues/show_bug.cgi?id=94901

An alternative is change the code to:

Sub initStrLocale as String
Dim PathSubstitutionService As Object
PathSubstitutionService = createUnoService("com.sun.star.util.PathSubstitution")
OOLangue = PathSubstitutionService.getSubstituteVariableValue("$(langid)")
Select Case OOLangue
Case "1046" ' Brazilian Portuguese
strMsg(0) = "Esta função não pode ser utilizada com seleções múltiplas."
strMsg(1) = "BrOffice.org"
Case "1033"
strMsg(0) = "This function cannot be used with multiple selections."
strMsg(1) = "OpenOffice.org"
Case "2057"
strMsg(0) = "This function cannot be used with multiple selections."
strMsg(1) = "OpenOffice.org"
Case "1036"
strMsg(0) = "Cette fonction est incompatible avec la sélection multiple."
strMsg(1) = "OpenOffice.org"
Case "1034"
strMsg(0) = "Esta función no se puede aplicar con selecciones múltiples."
strMsg(1) = "OpenOffice.org"
End Select
End Sub

But also it's important solve the problem of the menu item in Addons.xcu:

Copy only visible cells
Copy only visible cells
Copier uniquement les cellules visibles
Copiar somente as células visíveis
Copiar sólo las células visibles

and

Copy only visible cells
Copier uniquement les cellules visibles
Copiar sólo las células visibles
Copiar somente as células visíveis

I´m studying the case. Any news I´ll notice here.

If you have another suggestions, please, contact me! :)

Thank you!

Just 2 remarks

Just after click on 'Copy only visible cells' button, entire sheet is selected. Maybe more user-friendly if selection come back to this did by the user previously.

Is it possible to translate tooltip button? In french: "Copier uniquement les cellules visibles".

Obrigado por esta extensão ;-)

Thanks bidouille for your

Thanks bidouille for your comments!

I released a new version of the extension with your suggestions and other improvements. Please, try the new 0.9.3 version at:

http://extensions.services.openoffice.org/node/4239