Use Python to launch Excel file
问题 when i try os.system("open " + 'myfile.xlsx') i get the output '0' similarly, trying os.system("start excel.exe myfilepath") gives the result 32512 I have imported os and system, and I'm on mac. How can I change this so it does actually launch that excel file? And out of curiosity, what do the numbers it prints out mean? Thanks! 回答1: If you only want to open the excel application you could use subprocess: import subprocess subprocess.check_call(['open', '-a', 'Microsoft Excel']) You can also