[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] Location of Execution files



Hi Ian 

I had misinformed you before, its not a simple "myFile.open(Excel.xls)" however it requires the Windows COM API, the command is: 
"pBook = xl->Workbooks->Open("Excel.xls")"  As this allows me to open the spreadsheet within and instance of Excel. 

I have tried ".\Excel.xls", ".\\Excel.xls", "..\\Excel", "\." and even just leaving it as the file itself, hoping that it would point to the current directory. But they all throw the COM error: 

"Oops - hit an error!
Code = 800a03ec
Code meaning = Unknown error 0x800A03EC
Source = Microsoft Office Excel
Description = '.\Excel.xls' could not be found. Check the spelling of the file name, and verify that the file location is correct.

If you are trying to open the file from your list of most recently used files, make sure that the file has not been renamed, moved, or deleted. "


This leads me to believe that it is the Excel COM API which is trying to access the file, so the shorthand might not be applicable. In most examples I have seen the file has been opened using a hard coded string including the full directory, so it might not be possible. Still trying though.     

All help has been much appreciated, I won't be giving up, And should I find a solution I will let you know :)

Cheers,
Stefan

-----Original Message-----
From: condor-users-bounces@xxxxxxxxxxx on behalf of Ian Chesal
Sent: Tue 17/03/2009 17:13
To: Condor-Users Mail List
Subject: Re: [Condor-users] Location of Execution files
 
> What I have to do is, as you said, to change my code "to look
> in the working directory for any input files it requires".
> 
> However I have used a simple myFile.open(.....directory and
> file........); command in C++. If the directory depends on
> the processID then I cannot just hardcode.
>
> "myfile.open(c:\condor\execute\dir\EXCEL.xls)"
>
> This means I have to find another way of finding and opening
> EXCEL. Does the _CONDOR_SCRATCH_DIR set the processed
> permanently to 400? and on all execution nodes?

The process ID changes every time Condor starts a new job. But that shouldn't matter. Condor will put both the Excel file and the executable in the same temporary directory for you on the remote machine. So you only need to say:

        myfile.open(.\EXCEL.xls)

in your C++ file. "." is short-hand for "current working directory".

> I am also looking into a way of opening a file from the working
> direcotry, however being a beginner with both Condor and C++ it
> might take some time. However it might be as simple as opening
> a file in the working directory.

See above. :)

- Ian

Confidentiality Notice.
This message may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient, you are hereby notified that any use, disclosure, dissemination, distribution,  or copying  of this message, or any attachments, is strictly prohibited.  If you have received this message in error, please advise the sender by reply e-mail, and delete the message and any attachments.  Thank you.

_______________________________________________
Condor-users mailing list
To unsubscribe, send a message to condor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/condor-users

The archives can be found at: 
https://lists.cs.wisc.edu/archive/condor-users/

<<winmail.dat>>