Page 1 of 1

Closing a workfile

Posted: Mon Feb 23, 2009 8:00 am
by javiersan
Hi,

I have an excel file with data I want to import, I know how to open it and create a workfil(Wfopen) but I don't know how to close the workfile using a variable that contains the workfile name.

Code: Select all

%fname= "data23feb09" %evname=%fname+".wf1" %fname=%fname+".xls" wfopen %fname colhead=2 namepos=first range="Daily" 'This works close data23feb09.wf1 'This does not work close %evname
Could you please help me with this?

Thanks,

Javier

Re: Closing a workfile

Posted: Mon Feb 23, 2009 8:48 am
by Jay
Hi,

just use a replacement variable with those brackets: { }

In your example this would look like this:

close {%evname}

Re: Closing a workfile

Posted: Mon Feb 23, 2009 9:22 am
by javiersan
Thanks!