title: Calling python script from excel/vba
body: <p>I have a python code that reads 3 arguments (scalars) and a text files and then returns me a vector of double. I want to write a macro in vba to call this python code and write the results in one of the same excel sheet. I wanted to know what was the easiest way to do it, here are some stuffs that I found:</p>
  
  <ul>
  <li><p>call the shell() function in vba but it doesn't seem so easy to get the return value.</p></li>
  <li><p>register the python code as a COM object and call it from vba--> i don't know how to do that so if you have some examples it would be more than welcome</p></li>
  <li><p>create a custom tool in a custom toolbox, in vba create a geoprocessing object and then addtoolbox and then we can use the custom tool directly via the geoprocessing object but this is something as well that I don't know how to do..</p></li>
  </ul>
  
  <p>Any tips?</p>