RTC Issue while calling function xlsApp.Workbooks.Open

postsauravpostsaurav Member Posts: 708
edited 2012-11-30 in NAV Three Tier
Hi all,

I am trying to import some lines from excel worksheet.

The code is working fine in Classic Client but when i try to run that code from RTC it gives me a error while calling xlsApp.Workbooks.Open Function.

The Function is defined as -
CLEAR(xlsApp);
CREATE(xlsApp);
xlsApp.Visible(FALSE);
xlsApp.Workbooks.Open('D:\test.xlsx');
xlsWorkBook := xlsApp.ActiveWorkbook;

The error message says -

Microsoft Dynamics NAV

This message is for C/AL programmers: The call to member Open failed: Microsoft Excel cannot access the file 'D:\test.xlsx'. There are several possible reasons:

• The file name or path does not exist.
• The file is being used by another program.
• The workbook you are trying to save has the same name as a currently open workbook..
OK

Let me know if someone have faced and resolved the issue.

Thanks & Regards,
Saurav Dhyani

Do you Know this About NAV?


Connect - Twitter | Facebook | Google + | YouTube

Follow - Blog | Facebook Page | Google + Page

Answers

Sign In or Register to comment.