0

I am converting my code to executable using pyinstaller. The problem I am facing is that the program needs an excel file to be complete and the executable keeping saying it can't find it. I placed the excel file in the same directory as the executable yet I get not found. Before converting the program to the executable, the excel file was placed in the same directory as the program and it works. Is there a way to add the excel file to the executable(preferably) or where should I store it so that it can find it?

wb2 = load_workbook('file.xlsx')
  • 1
    is the executable started in its own folder? i.e. is the working directory the executable directory, depending on how you start an executable it can be different. – esoterik Jul 25 '18 at 18:36
  • Take a look at this question: [Pyinstaller adding data files](https://stackoverflow.com/questions/41870727/pyinstaller-adding-data-files) – gommb Jul 25 '18 at 18:48

0 Answers0