+ Reply to Thread
Results 1 to 6 of 6

call a python script from excel vba

  1. #1
    Registered User
    Join Date
    01-05-2013
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    31

    call a python script from excel vba

    Hi all,

    I am writing a python script to parse certain text in cells in a spreadsheet.

    I want to pass data in columns a,b,c one row at a time to my script, let the script parse the text then write to column d before moving onto the next row.

    Will this be possible to do? How would I go about calling the script?
    Can I make excel wait until my script has done its thing before calling the script again with the next row?


    The script would ideally accept the text passed to it at the command line like this..

    Myscript.py column a column b column c


    Many thanks for any help.

  2. #2
    Registered User
    Join Date
    01-05-2013
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: call a python script from excel vba

    The mobile forum app marked this thread as solved. U can't undo it........

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: call a python script from excel vba

    Could you not do the whole thing in Python?
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    01-05-2013
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: call a python script from excel vba

    Quote Originally Posted by Norie View Post
    Could you not do the whole thing in Python?
    Dunno.. can I write stuff for excel using python? It's not something I've looked into and I'm nowhere near a computer (typing this on my phone).

    I'm just having a bit of a late night brainstorm and wondering what's possible and what's not.
    The parsing section of the script is all thought out and um ready to start coding it up. Just unsure how to get excel to interact with it..


    Tia

    Paul.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: call a python script from excel vba

    Paul

    As far as I'm aware you can work with Excel via Python.

    I don't know too much about it though.

    Perhaps this will be of use http://www.python-excel.org/.

  6. #6
    Registered User
    Join Date
    01-05-2013
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: call a python script from excel vba

    Quote Originally Posted by Norie View Post
    Paul

    As far as I'm aware you can work with Excel via Python.

    I don't know too much about it though.

    Perhaps this will be of use http://www.python-excel.org/.
    Good stuff. Thanks for that.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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