Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index

Ciao, ho un problema con una macro per copiare i dati dal file "fattura" al file "dati, vorrei modificarla per aggiungere altre 3 colonne al range copiato, al posto dell'intervallo "A13:I44" vorrei che mi copiasse "A13:N44. Grazie in anticipo a chi mi può aiutare. Nicola

Sub Nico
    Dim aFileProp(0) As New
    oDoc = ThisComponent
    oSheet = oDoc.Sheets.getByName("Foglio1")
    oCopyRange = oSheet.getCellRangeByName("A13:I44")
    'oTransferable = oDoc.CurrentController.getTransferable()
oDoc = StarDesktop.LoadComponentFromURL(ConvertToURL("/home/nicola/fatture/dati.ods"), "_default", 0, aFileProp())
    oSheet = oDoc.Sheets.getByName("Foglio1")
    oCellCursor = oSheet.createCursor()
    nEndRow = oCellCursor.getRangeAddress().endRow + 1
oPasteRange = oSheet.getCellRangeByPosition(0, nEndRow, 8, nEndRow + (44 - 13)) '0=A 8=I
    oPasteRange.DataArray = oCopyRange.DataArray
   For i = nEndRow + (44 - 13) To nEndRow Step -1
If oSheet.getCellByPosition(0, i).Type = Then
       oSheet.getRows.removeByIndex (i, 1)
     End If
   Next i
End Sub

Come cancellarsi: E-mail
Linee guida per postare + altro:
Archivio della lista:
Tutti i messaggi inviati a questa lista vengono archiviati pubblicamente e non sono eliminabili


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.