Excel - Automatically fill in a cell

I am working on an automator work flow that asks the user the following information.

Client Name
Project Name
Date
Project Information

Currently the automator work flow creates a project folder, and a client folder with relevant sub-folders. In addition to this it copies template contracts (word) and estimate (excel) documents into the appropriate folders. The next step to my automation tool would be to ask the user a few more questions about the project and automatically publish this information in the excel and or word document.

So here is the question - Is there an automator workflow that allows to update existing word/excel documents in an automator workflow.

Writing this on my iPad Pro, so untested. But maybe this could at least point you in the right direction. Open the excel file using Automator and execute this Pplescript

set myQuestion1  to display dialog "What is the name of this projec?"
set myQuestion2  to display dialog "another question?"

set myAnswer1 to text returned of myQuestion1
set myAnswer2 to text returned of myQuestion2

tell application "Microsoft Excel"
	tell active sheet
		set value of cell "a1" to myAnswer1
		set value of cell "a2" to myAnswer2
		save
	end tell
end tell

Also not the cleanest code, but it might work. :wink:

If you need more questions just copy/paste the questions and the lines where we set the answers.

This will set the answers in cells a1 and a2. But you can change those of course

1 Like