Skip to main content
I have a routine that writes data into rows in Excel through a workspace runner but once the routine is finished I want FME to open the spreadsheet. 

 

 

I have looked at both python and TCL but can't get anything to work without runtime errors. 

 

 

Does anyone have any scripts I would use to simply open an xlsx in a shutdown script. 

 

 
Hi, you can use in start up:

 

 

   set filename {yourfilenameinclpath}

 

   set shortname rfile attributes $filename -shortname]

 

   exec cmd.exe /k start $shortname &

 

 

 

 
In a Python shutdown script in Windows the following works:

 

 

import os

 

os.system("Book1.xlsx") # Assuming your filename is Book1.xlsx

 

 

If this doesn't work, you can include the "start" word:

 

 

import os

 

os.system("start Book1.xlsx")

 

 

If your XLSX is in another directory than your FME script, give it an absolute path.
shutdown i ment, and it is a tcl snippet
Many thanks for both Gio and JimO's responses. It is now working using the Python script

 

 

import os

 

os.system("Book1.xlsx")

 

 

 

Reply