+ Reply to Thread
Results 1 to 8 of 8

Can you use (or compile?) Python code in Excel

  1. #1
    Forum Contributor
    Join Date
    11-11-2011
    Location
    London England
    MS-Off Ver
    Excel 2011 for Mac
    Posts
    157

    Question Can you use (or compile?) Python code in Excel

    Hi,

    Sorry I was unsure of where to try and post this in the regular forums so I thought I'd try in here. Basically I have found some Python code that I would like to see what numbers it comes up with (but where I don't do the Python thing - didn't have a clue where to start and wondered could you put in like a Macro?). I have found a workbook for doing tennis probabilities (http://strategicgames.com.au/index.php?p=1_14), but read about Courtsiding on the 538 blog a couple of weeks ago, http://fivethirtyeight.com/features/...ennis-betting/ which led me here http://summerofjeff.wordpress.com/20...tennis-markov/ - and basically I am just keen to see what kind of numbers the model comes up with. I was just wondering was there any way of effectively compiling (I'm not even sure if that is the right term) Python code in Excel (as I can get the data to put in, I just couldn't figure out what to do with the code and just wanted to see how it compared to the other model).

    Thanks in advance for any suggestions.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Can you use (or compile?) Python code in Excel

    There is no Python compiler for Excel. You'd need to port the code to VBA.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    11-11-2011
    Location
    London England
    MS-Off Ver
    Excel 2011 for Mac
    Posts
    157

    Re: Can you use (or compile?) Python code in Excel

    Thanks. Are there/is there a preferred utility for porting Python code as I'm figuring someone has tried to do this, especially as there was a python tag.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Can you use (or compile?) Python code in Excel

    I know of no utility to port any language to any other.

  5. #5
    Forum Contributor
    Join Date
    11-11-2011
    Location
    London England
    MS-Off Ver
    Excel 2011 for Mac
    Posts
    157

    Re: Can you use (or compile?) Python code in Excel

    Thanks again for replying. At least I know now that I can't go down this route to find what's at the end of the code.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Can you use (or compile?) Python code in Excel

    You're welcome.

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Can you use (or compile?) Python code in Excel

    You might be able to make use of excelpython.
    http://newtonexcelbach.wordpress.com...rix-functions/
    Cheers
    Andy
    www.andypope.info

  8. #8
    Forum Contributor
    Join Date
    11-11-2011
    Location
    London England
    MS-Off Ver
    Excel 2011 for Mac
    Posts
    157

    Re: Can you use (or compile?) Python code in Excel

    Quote Originally Posted by Andy Pope View Post
    You might be able to make use of excelpython.
    http://newtonexcelbach.wordpress.com...rix-functions/
    Thanks, I will definately look into this as it looks like a possible way of doing it (but where I don't have a great background in this kind of thing, I think I will take my time and have a good read).

    Thanks for the suggestion.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. call a python script from excel vba
    By sheffieldlad in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-28-2013, 07:11 PM
  2. [SOLVED] Can Excel solve my problem or do I need Access / Python?
    By MHT888 in forum Excel General
    Replies: 11
    Last Post: 01-13-2013, 02:54 PM
  3. Python commands in Excel
    By ljoseph in forum Excel General
    Replies: 0
    Last Post: 09-18-2009, 07:02 AM
  4. Excel and Python
    By davidlawrence in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-24-2008, 08:42 AM
  5. [SOLVED] Compile an Excel 2003 Application with VBA 6.0 Code
    By Heinzpeter in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-07-2005, 03:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1