AnsweredAssumed Answered

filemaker to applescript conversion

Question asked by willrollo on Feb 10, 2014
Latest reply on Feb 19, 2014 by FentonJones

Title

filemaker to applescript conversion

Post

     HI

     I have a short applescript that is designed to open a file in my desktop in excel, and save the file as a cdv, then close. This all works fine, except the file is originally created and named by filemaker. The file is named the after the previous month followed by invoices. I do not know how to script this in applescript - below shows what I am trying to say , but the get parts need translation!

     The reason I am doing this is because Filemaker is not capable of exporting as windows csv, only mac type (filled with"""")

      

      
      
      
     set theDoc to (path to desktop as text) & "file:" & "Invoices " & MonthName ( Get ( CurrentDate ) - Day ( Get ( CurrentDate ) ) )& ".csv"
      
     set outPath to (path to desktop as text) &  "Invoices " & MonthName ( Get ( CurrentDate ) - Day ( Get ( CurrentDate ) ) )& ".csv"
      
     tell application "Microsoft Excel"
         open file theDoc
         tell workbook 1
             tell sheet 1
                 save in outPath as CSV file format
             end tell
             close without saving
         end tell
     end tell

Outcomes