Path: news.mathworks.com!not-for-mail
From: "Ashish Uthama" <first.last@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Using Compiled XLS File
Date: Mon, 27 Oct 2008 14:27:48 -0400
Organization: TMW
Lines: 42
Message-ID: <op.ujo38mn4a5ziv5@uthamaa.dhcp.mathworks.com>
References: <ge37ma$7rk$1@fred.mathworks.com>
 <ge4qab$mt2$1@fred.mathworks.com>
NNTP-Posting-Host: uthamaa.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15
Content-Transfer-Encoding: 7bit
X-Trace: fred.mathworks.com 1225132068 12824 172.31.57.126 (27 Oct 2008 18:27:48 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 27 Oct 2008 18:27:48 +0000 (UTC)
User-Agent: Opera Mail/9.60 (Win32)
Xref: news.mathworks.com comp.soft-sys.matlab:497494


How do you include WTASummary.xls? The recommended approach is to place it  
under 'Other files' in DEPLOYTOOL.

File under this section will be extracted to the CTF root directory, under  
a subdirectory which has the same name as the project.
You should then use the CTFROOT function to build up the path to this  
excel file. Something along the lines of:

copyfile(fullfile(ctfroot,'yourProjectName','WTASummary.xls'),  
[directoryName, fileName]);

Also:
> directoryName = ['Lot ', lotSummary.LotID, '\'];
> mkdir(directoryName);
Note: this creates the dir in the 'current working directory'. This might  
not be what you expect on a deployed application, ensure you CD to a  
specific directory first or use absolute path names.


On Mon, 27 Oct 2008 12:30:03 -0400, Brian  <ceo21mil@hotmail.com> wrote:

> Thank you for the responses.
>
> Below is the relevant portion of my code:
>
> % Excel Summary File
> directoryName = ['Lot ', lotSummary.LotID, '\'];
> mkdir(directoryName);
> fileName = ['Lot ', lotSummary.LotID, ' Summary.xls'];
> copyfile('WTASummary.xls', [directoryName, fileName]);
> cd(directoryName);
>
> And the error message from the compiled stand alone application:
>
> ??? Error using ==> copyfile
> No matching files were found.
>
> MATLAB:COPYFILE:FileDoesNotExist
>
> Best regards,
> Brian