4

My first question on the site, so hopefully I'm doing this right.

I use file juggler on my windows machine. The program can watch for new files and trigger run commands.

When a new csv file arrives I would like a run command that would open that file in excel.

Thanks

Canadian Luke
  • 24,640
Dean
  • 51

2 Answers2

5

If you include the Office directory that contains Excel.exe, then you don't need to explicitly set the path in your command line. The simplest thing to try is just type excel.exe and the CSV file name after it.

Otherwise, you will have to set the path explicitly. Using double quotes for excel and double quotes for the CSV is best:

"c:\program files\microsoft office\office12\excel.exe" "c:\newfile.csv" 
Sun
  • 6,480
0

You can use Python to open a .csv file in Excel. It will still save as a .csv unless you change the format using Save As:

import os
WK_PATH = "C:\\Working_files\\"
f_name = "myfile"
os.system('start excel ' + WK_PATH + f_name + '.csv')