cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

How can use path in writeexcel function

TR_9781963
9-Granite

How can use path in writeexcel function

How do I use the CWD path in WRITEEXCEL command 

 

TR_9781963_0-1657571591469.png

 

1 REPLY 1
Werner_E
25-Diamond I
(To:TR_9781963)

There is already a backslash at the end of the string "Dir" so you have to omit it when using that variable in WRITEEXCEL.

Furthermore "Dir" already IS a string which you want to concat with the file name, so you should write

WRITEEXCEL(concat(Dir,"A.xlsx"),Data)

I am not sure what you intended with the last two arguments (1,1)? If you meant that the "Data"-Matrix should be written with the top left value in cell A1, then you don't need to tell Prime so as this is the default. If you want to use that range argument, you would have to provide a string as third argument -> "A1".

You can also specify which sheet of a multi-sheet Excel file the data should be written to. You may want to lookup the syntax for WRITEEXCEL in the help.

 

Announcements

Top Tags