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!
XLBOOK=ERR: File does not exist
Moderators: Dorian (MJT support), JRL
- Dorian (MJT support)
- Automation Wizard
- Posts: 1378
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: XLBOOK=ERR: File does not exist
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
Re: XLBOOK=ERR: File does not exist
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!
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!
- Dorian (MJT support)
- Automation Wizard
- Posts: 1378
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: XLBOOK=ERR: File does not exist
No worries at all. Well done for finding the error.
Yes, we have a Custom Scripting Service. Message me or go here