Here's a challenge...

So I’m getting a bunch of Excel workbooks (5-30) at a time and I need their worksheets (the little tabs if you will) condensed into one workbook (ie one window with all the other windows converted to tabs). There’s an option of Edit/Move or Copy Sheet… but once I’m within that window, I cant tab or arrow my way thru fields.
Big thanks in advance!

This is what I have, but its still being developed.

activate application "Microsoft Excel"
tell application "System Events"
	tell process "Microsoft Excel"
		keystroke "n" using command down
		keystroke "s" using command down
		delay 1
		keystroke "Rename Me Please"
		keystroke return
		
		--toggles between windows within Excel
		click menu bar item "Window" of menu bar 1
		keystroke "2"
		keystroke return
		
		(*
		keystroke "a" using command down
		keystroke "c" using command down
		keystroke "w" using command down
		keystroke return
				
		--toggle back to Rename Me Please spread sheet
		click menu item "Worksheet" of menu 1 of menu bar item "Insert" of menu bar 1
		keystroke "v" using command down
		keystroke return
		
		-- repeat X times
		-- X is number of files as counted by finder in a folder 
		*)
		
	end tell
	
end tell


I would give up system events and move on to Excel’s scripting dictionary. Microsoft applications are a bit odd to script but I believe that what you need is built into it. I’m not that familiar with Excel so I’m not sure what functions that you need to call to do what you want. Just a guess here but you are probably looking for the following (From Excell 2004 AppleScript Reference):

A start to referring to Excel documents:

tell application "Microsoft Excel"
	activate
	activate object workbook 1
end tell