XLSheet to Array trouble

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

XLSheet to Array trouble

Post by Bob Hansen » Tue Oct 09, 2012 9:22 pm

I have been getting a random error with the XSheetToArray command.

Code: Select all

XLSheetToArray>%vFileName%,Sheet2,vResults
I get the error, sometimes, when running real time.
If I single step through the script, I will get an error message:
"A lock violation has occurred."

I can still continue to single step through the script bu I have no vResults array values to work with. When it works properly, the array is complete with no problems.

But when I get the error, the only way I can stop it is to Exit Macro Scheduler completely. Just exiting the script, or closing the Control Panel to the Notification Area, does not good.

Excel is not open, so there should be no lock from there. This is early in the script and the spreadsheet is not called for anything before this.

Who has the "key" to make the "lock" error go away?
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Oct 11, 2012 7:46 pm

This does suggest that something else has the file open. May be there's a stray Excel process that hasn't closed down properly - have a look in Task Manager.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

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