Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Log File Error Causes failure to terminate in xlwings VBA on macOS. #666
If I call a Python program using the RunPython method from VBA in Microsoft Excel 2016 for macOS, I get a timeout. This is based, I've found, on the amount of print statements included in the program.
I created a simple enough program to replicate the program. Basically, when the program prints to xlwings_log.txt excessively, it fails in some way. If you look at the xlwings_log.txt file, the print statements are all there, except the file ends in
The xlwings program in VBA will stay running, eventually causing Microsoft Excel to stop responding. At a certain point it will ask you to wait or quit Excel. If you wait, eventually the program terminates and xlwings_log.txt is deleted.
Basically, some error is causing Excel to hand when the file prints enough. If you reduce the print statements to 1000, there doesn't seem to be an issue.