Information générale
Catégorie:
COM/DCOM et OLE Automation
Titre:
Copying excel sheets from one excel to another
Hi,
I am trying to copy multiple excel worksheets into one target excel file.
All excel files have been created with a copy to xl5 statementand and thus have one worksheet named after the filename.
Here's what I've tried:
oxlsSource = createobject('Excel.application')
oxlsTarget = createobject('Excel.application')
oSourceWorkbook = oxlsSource.workbooks.open('e:\source.xls')
oTargetWorkbook = oxlsTarget.workbooks.open('e:\target.xls')
oSourceWorkbook.worksheets(1).move(oTargetWorkbook.activesheet)
When I do this, excel starts complaining about the properties of move that can't be fetched from the class worksheet.
What am I doing wrong?
TIA,
Raymond
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement