Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Excel Automation Object in Windows x64



Permlink Replies: 1 - Last Post: May 18, 2016 1:56 PM Last Post By: Sudesh C
Sudesh C

Posts: 34
Registered: 9/13/08
Excel Automation Object in Windows x64
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 18, 2016 11:59 AM
Hello:

Following Excel Automation code doesn’t seem to work under Windows x64.

XL = CreateOleObject("Excel.Application");

Any idea?

Thanks,
Sudesh
Sudesh C

Posts: 34
Registered: 9/13/08
Re: Excel Automation Object in Windows x64
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 18, 2016 1:56 PM   in response to: Sudesh C in response to: Sudesh C
Hello:

Actually the error is encountered at the following line:

XLFile = XLWorkBooks.OleFunction("Open", (OleVariant) myExcelFile);

and the error message is as below:

Microsoft Office Excel cannot access the file d:\foo\foo.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.

However the file and the path is just fine and none of the above is true.

The code works ok in x86 but x64 reports above error.

Any idea?

Thanks,
Sudesh

"Sudesh C" wrote in message news:853924 at forums dot embarcadero dot com...

Hello:

Following Excel Automation code doesn’t seem to work under Windows x64.

XL = CreateOleObject("Excel.Application");

Any idea?

Thanks,
Sudesh
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02