Launch Excel file from Python on Mac -
i'd start excel file python on mac. when hardcode file path in following lines works fine.
import os os.system("open -a 'microsoft excel.app' 'path/file.xlsx'")
but problem instead of hardcoding path solution should like:
file_path = '/users/path/file.xlsx' import os os.system("open -a'microsoft excel.app' 'file_path'")
apparently not work. in advance
try maybe:
os.system("open -a 'microsoft excel.app' '%s'" % file_path)
Comments
Post a Comment