Applescript Help
Hey guys,
I have a script that I've written, but I have a small issue with it - wondering if any one can lend a hand.
Some background - I have large excel files - this script will take my selected column values, and create folders out of the names to a specified folder.
My issue is that if there are duplicate values in the Excel sheet, the script will get an error. I know that usually you can add 'with replacing' but I believe since mine says 'with properties' that overrides 'with replacing'
Hope this makes sense. Script attached:
set rowAList to getCellList("G", 2, 41)
tell application "Microsoft Excel" to set allDocs to name of every document
set myDoc to choose from list allDocs
set myFolder to (choose folder)
repeat with i in rowAList
tell application "Microsoft Excel" to tell document (myDoc as string) to tell sheet 1 to set cellValue to (value of cell i)
tell application "Finder" to make new folder at myFolder with properties {name:cellValue} with replacing
end repeat
on getCellList(aLetter, startNumber, endNumber)
set myList to {}
repeat with i from startNumber to endNumber
set end of myList to (aLetter & i) as string
end repeat
return myList
end getCellList
iMac, OS X Yosemite (10.10.2)