D
degouville
Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel
Hello,
Can someone explain me why this script does not work ?
It does not want to active the target workbook. So it copies the values in the source workbook and not in the target one.
tell application "Microsoft Excel"
activate
set source_file to "Macintosh HD:Usershilippedegouvilleocumentsrojet:script:source.xls"
set target_file to "Macintosh HD:Usershilippedegouvilleocumentsrojet:Script:cible.xls"
open source_file
open target_file
repeat with i from 1 to 3
activate object workbook source_file
set valeur_source to value of cell i of column 1
activate object workbook target_file
set value of cell (i + 3) of column 1 to valeur_source
end repeat
end tell
Thanks
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel
Hello,
Can someone explain me why this script does not work ?
It does not want to active the target workbook. So it copies the values in the source workbook and not in the target one.
tell application "Microsoft Excel"
activate
set source_file to "Macintosh HD:Usershilippedegouvilleocumentsrojet:script:source.xls"
set target_file to "Macintosh HD:Usershilippedegouvilleocumentsrojet:Script:cible.xls"
open source_file
open target_file
repeat with i from 1 to 3
activate object workbook source_file
set valeur_source to value of cell i of column 1
activate object workbook target_file
set value of cell (i + 3) of column 1 to valeur_source
end repeat
end tell
Thanks