Some thing similar that I had work on using Excel Visual Basic- Rhino scripting. Thought it might help you.