Process class. Here's how you can do it: Process class to execute a Python script and capture its output. Here's a step-by-step guide: Shell function to execute a Python script or by using the RunPython method available in newer versions of Excel. Here's how you can do it using both methods: requests library to make an HTTP request to the server and retrieve the content of the file. Here's a basic example: