Share via

Unable to load a file with python script launched from Excel

Anonymous
2024-10-31T17:32:35+00:00

Hello everybody,

I'm trying this new feature to use python scripts from Excel 365 spreadsheet. I copied a python script who's actually working if executed from Visual studio code and tried to run it in Excel, unfortunately I got following error: "FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\Zanepid0\OneDrive - Ariston Group\Desktop\SAP\Effettivo.txt'"

I also moved my txt to c:\Effettivo.txt, I also used absolute path, normalize path but nothing changed, I always got the error.

I repeat again, my file is actually there and same pyton script executed from VSCode has no problem. Any clue?

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Anonymous
    2024-11-05T08:21:14+00:00

    just read this under microsoft support. They want to force you using power query to load datas from external sources....

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2024-11-05T08:18:01+00:00

    Thank you for your time but I think this is not the point. My problem is that pyhton script executed by excel is not able to find txt file where I have datas to load in the dataframe. Same script is 100% working if executed from VS code

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2024-11-01T04:23:52+00:00

    Was this answer helpful?

    0 comments No comments