XLBOOK=ERR: File does not exist

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Ref01010
Newbie
Posts: 5
Joined: Mon Sep 06, 2021 11:09 pm

XLBOOK=ERR: File does not exist

Post by Ref01010 » Tue Sep 07, 2021 1:58 am

I am having trouble accessing an Excel file when using a macro. The Macro is just two lines (so far):

XLOpen>%D:\!IPMI\Delegate Acquisition%\test.xls,1,xlBook
XLGetCell>xlBook,sheet1,1,2,FirstName

I got an error "Access violation at address 0043298F in module 'msched.exe'. Read of address FFFFFFF0."

In the debugger I see the error is generated on the 1st line. I get

0: XLBOOK=ERR: File does not exist

I'm thinking that the macro was looking in the wrong directory, rather than where I am asking it to look (D:\!IPMI\Delegate Acquisition).

So I tried including
ChangeDirectory>D:\!IPMI\Delegate Acquisition\
Before the XLOpen command

But that didn't make any difference.

I tried with and without the percent signs in the XLOpen line.
I tried moving the test.xls to different directories.

Any suggestions on what I am doing wrong?

I am on Windows 10, Excel Office Professional Plus 2016 and a brand new install of Macro Scheduler.

Thanks!

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1378
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: XLBOOK=ERR: File does not exist

Post by Dorian (MJT support) » Tue Sep 07, 2021 7:41 am

Remove the % from the first line. Macro Scheduler will think that's a variable, and of course that variable does not exist.
Yes, we have a Custom Scripting Service. Message me or go here

Ref01010
Newbie
Posts: 5
Joined: Mon Sep 06, 2021 11:09 pm

Re: XLBOOK=ERR: File does not exist

Post by Ref01010 » Tue Sep 07, 2021 11:07 am

Sorry. I should have been more clear. I tried it without the %, but I still had the problem. But that is good to know. I guess I got that from a sample that was using a variable.

But I just noticed what my newbie error is. The ending on the Excel file is xlsx not xls. The Macro now finds the file and moves past this point and I can start building the rest of it and move on to other errors. :)

I just need to pay more attention to the details.

Sorry to bother you!

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1378
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: XLBOOK=ERR: File does not exist

Post by Dorian (MJT support) » Tue Sep 07, 2021 11:42 am

No worries at all. Well done for finding the error.
Yes, we have a Custom Scripting Service. Message me or go here

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts