Skip to content

Instantly share code, notes, and snippets.

View philadams-zz's full-sized avatar

Phil Adams philadams-zz

View GitHub Profile
@philadams-zz
philadams-zz / many_csvs.applescript
Created June 30, 2011 16:04
Excel: save all sheets as individual .csv files
set f to choose file
set outputDirectory to (path to downloads folder as text) & "Excel:converted:"
-- make sure the outputDirectory exists and if not create it
if outputDirectory ends with ":" then set outputDirectory to text 1 thru -2 of outputDirectory
do shell script "mkdir -p " & quoted form of POSIX path of outputDirectory
-- save all worksheets as csv files
set csvPaths to {}
tell application "Microsoft Excel"