External files

Q:
I would like to access a file saved in a folder that is in the app folder.
How would I access the app path?

For example, say file abc.xls exists in an Excel folder.
The development path could be:
C:\Lianja\apps\testing\Excel\abc.xls.

I could use the following:

Code:
oExcel = CREATEOBJECT("Excel.application")
// Need help here.
cExcelPath = app.path + "\Excel\abc.xls"
oWorkbook = oExcel.Workbooks.Open(cExcelPath)

A:
DEFAULT() or even SYS(2003) should do it for you.



Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s