Copier un tableau Excel

hred1 Messages postés 108 Date d'inscription samedi 9 avril 2005 Statut Membre Dernière intervention 6 décembre 2007 - 6 sept. 2006 à 18:29
cs_GeorgesDeLajungle Messages postés 29 Date d'inscription lundi 22 mars 2004 Statut Membre Dernière intervention 22 juin 2007 - 29 sept. 2006 à 14:13
Bonjour,

je cherche à copier un tableau Excel, puis le coller sur word

Mais j'arrive pas à selectionner/copier la plage de mon tableau

je pense qu'il faut déclarer la cellule de départ et celle d'arrivée

cependant je ne voie pas comment!!!


wsExcel = wbExcel.Worksheets("1")

        With wsExcel

             'remplir les cells

            .Cells(3, 3) = 111111

             'copier le tableau ?????

           
.Range("A").CopyPicture(Excel.XlPictureAppearance.xlPrinter,
Excel.XlCopyPictureFormat.xlPicture)

        End With

merci

1 réponse

cs_GeorgesDeLajungle Messages postés 29 Date d'inscription lundi 22 mars 2004 Statut Membre Dernière intervention 22 juin 2007 1
29 sept. 2006 à 14:13
Avec .Net c'est assez simple
Voila un exemple

        Dim excelapp As New Excel.Application
        excelapp.Workbooks.Open("c:\tableau.xls")
        excelapp.Range("A1:C3").Select()
        excelapp.Selection.copy()
        excelapp.Quit()

        Dim wordapp As New Word.Application
        wordapp.Documents.Add(Template:="normal", NewTemplate:=False, DocumentType:=0)
        wordapp.Selection.Paste()
        wordapp.Visible = True

Eric
0
Rejoignez-nous