At 10:21 PM 1/12/2011, Doug Hamilton wrote:

I'm trying to export an XLS file to the current user's desktop using
Win system variables. Based on some google responses, I tried:

SET VAR vExportFileName = ('%UserProfile%\Desktop\' + .vExportFileName)

GATEWAY EXPORT XLS .vExportFileName +
SELECT * FROM TxnHistExceptTmp +
 OPTION COL_NAMES ON|SHOW_PROGRESS

RETURN

vExportFileName    =
%UserProfile%\Desktop\Exceptions_011211_2111.XLS

But that winds up in places unknown. I don't believe it's a file name
problem, because the file has an XLS extension and works if I hardcode
a path.

This is in Win 2K, but also needs to run XP & 7.

Any ideas?


Doug,

Here's how you define user's desktop path in R:BASE!

SET VAR vUserDesktop TEXT = NULL
SET VAR vUserDesktop = ('C:\Users\'+(CVAL('NetUser'))+'\Desktop\')

This will dynamically provide you with user's desktop path. Then,
you can define the desired vExportFileName accordingly.

Hope that helps!

Very Best R:egards,

Razzak.


Reply via email to