简体   繁体   中英

Solidworks PDM Launching Excel with Parameters

I have a Solidworks PDM transition that launches a particular Excel sheet that has a Workbook_Open routine that receives a parameter passed in from PDM. That parameter is the %folderpath% of the file being transitioned in PDM. The Excel routines run fine. However, Excel is trying to do too much with the passed in path. After the routine in Excel runs, an Excel dialog is throw as shown here: 错误信息

Excel is mashing the passed in path with an.xlsx extension (its running a.xlsm file). Here is the command line being executed in PDM "C:\Program Files (x86)\Microsoft Office\Root\Office16\EXCEL.EXE""C:\Users\guy\Desktop\TEST FOLDER RENAME.xlsm" /e/ %FolderPath% where the full folder path is C:\PTI\ECO\General\CR-0023482. Any ideas on why Excel is throwing this message and is there a way to suppress/stop it?

I found the issue and it is subtle. The command line in PDM's transitions action cannot have a space between the called spreadsheet and the passed in parameter. This argument works. "C:\Temp\F-Rename.xlsm"/e/%FolderPath% vs. "C:\Temp\F-Rename.xlsm" /e/%FolderPath%.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM