Answered Use of DFS pointers and Excel Issues

rirvin73

New Member
Hello,

We recently changed a program from looking at a hardcoded path name to a file to to a new DFS named path to the same file. The code that accesses the Excel file (it assigns a value to a cell in the file) and the macro inside the Excel file no longer execute. If we return the code to the hardcoded path it executes as expected. The DFS path is good and the macro inside the Excel job is good. The use of the same DFS pointer in other programs works without issue.

Any information would be appreciated.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
Can you share the relevant portion of your code (enclosed in CODE tags)?

Also, it might be helpful to know your platform version, Progress version, and Excel version.
 

rirvin73

New Member
Here you go.

Windows Server 2003
Progress v10.2
Excel 2003

Code:
ASSIGN xnewFileName = "<DFSPOINTERNAME>" + "\CUSTOMERS_NAME\" +  "\Reports\xfilename.xls".
CREATE "Excel.Application" chExcel.
 
chExcel:Visible = true.
chWorkBook = chExcel:WorkBooks:open(xnewFileName).
 
/* we have to do this because we dynamically created the directory where xnewFileName resides and this how the excel macro knows where to look for the .txt files */
/* If you know how to pass an outside variable to an Excel macro that would be great too.                                                                                                                                       */
 
chWorkSheet = chExcel:Sheets:Item(1).
chWorkSheet:Range("A1"):value = xtmpDirName.

/* this is where the macro gets run */
assign xrunString = xnewFileName + "!macro_procedure".
chExcel:RUN(xrunString).

RELEASE OBJECT chWorkSheet.
RELEASE OBJECT chWorkBook.
RELEASE OBJECT chExcel.
 
Top