Hey guys, always have been interested in learning AppleScript and using it more.
Today I am in need of a solution for a client. They are building a folder tree based off their clients and have given it in an Excel file. All of the data is on column A, rows 1 - 102. I would love to create a simple AppleScript to take the contents in Row 1 and create a folder with its contents inside of their folder on my desktop called “Client”. Here is what I have so far, but it is not working (obviously)
tell application "Microsoft Excel"
get value of cell "A1"
end tell
tell application "Finder"
make new folder at alias "Macintosh HD:Users:chriswanja:Desktop:" with properties {name:"Value"}
end tell
set rowAList to getCellList("A", 1, 102)
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}
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