Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pating In Excel
Message
De
18/05/2001 10:45:10
Todd Wolfe
Certified Marketing Services
Kinderhook, New York, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Pating In Excel
Divers
Thread ID:
00508718
Message ID:
00508718
Vues:
41
I have two sheets open one that I want to copy from and paste to another worksheet.

I am able to copy the data to my clipboard and then when I try to past to my other sheet I want to start on Cell A4 but it keeps trying to past on cell A1 overwriting my data that I already have. I set my range on the sheet I would like to paste on to A4 but it don't work. Any ideas?

copy to c:\temp\final_report.xls type xl5

cFILE2='c:\temp\final_report.xls'
oBook2=OEXCEL.WORKBOOKS.OPEN(cFILE2)
oSheet2=oBook2.ActiveSheet
myrga = 'A1:AZ' + alltr(str(reccount()))
myrg = 'A2:AZ' + alltr(str(reccount()))
myrg2 = 'A4:AM' + alltr(str(reccount() + 5))

ORange2=osheet2.Range(myrg)
oSourceRange=osheet2.Range(myrg)
oSourceRange.Copy()



ORange=oSheet.Range("A4")

osheet.Paste()
oBook2.Close()
oSheet.Range(myrga).Columns.AutoFit()





Thanks,
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform