Re: Excel save with overwrite currently not supported
Re: Excel save with overwrite currently not supported
- Subject: Re: Excel save with overwrite currently not supported
- From: Yvan KOENIG via AppleScript-Users <email@hidden>
- Date: Tue, 27 Aug 2019 22:21:53 +0200
May you try :
set HfsPath to "Macintosh HD:Users:Thomas:Desktop:Quicken:AllQport.xlsx"
tell application "Finder"
if exists file HfsPath then delete file HfsPath -- move to the trash
end tell
(*
# alternate version
tell application "System Events"
if exists disk item HfsPath then delete disk item HfsPath -- don't move
to the trash
end tell
*)
set sd to path to startup disk
tell application id "com.microsoft.Excel" -- Microsoft Excel
try
close sd -- will error # Are you sure that Excel is allowed to
do that ?
end try
end tell
tell application "Microsoft Excel"
launch
activate
set Shtno to 1
set newBook to make new workbook
set {lft, tp, rgt, bot} to {1142, 25, 2550, 687}
set the bounds of the front window to {lft, tp, rgt, bot}
select range "A1"
--paste Quicken data from clipboard
paste special on worksheet sheet "Sheet1" format Unicode text
display dialog "How does it look"
save workbook as newBook filename HfsPath
end tell
Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) mardi 27
août 2019 22:21:30
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden