batch job

I’m not sure if I’m posting at the right section.

There’s a lot of data in my Excel spreadsheet.
Data processing is more than what I can do in a simple formula.
I can build a command line program to return a text string one at time.
So, how do I write AppleScript to do a batch job in Excel?

For example, I have {1,2,3,4} in Column A of my spreadsheet.
I want to send these data one by one to my command line program as parameter.
Then paste what’s returned from my program back into spreadsheet.

Could someone help me with that?