Is the Excel file open?
Forums
Wondering if anyone has a short function for checking if an Excel file is open? I've found a few VB examples, which don't seem to be compatible within the IDEA Scripting environment.
Hi Brian
Hi Brian
Works like a treat when its open on the local computer, but not if another computer on the network has the file open.
Thinking out loud here, wondering if there is a way to have the IDEA importer just open the file as a "Read-Only" and not require full access to the file while importing it? I will keep looking around for options
Edward
Just thinking out loud, but
Just thinking out loud, but does the script throw an error when you try and import a file that is read-only? I haven't checked. If it does maybe what you want to do is copy the file to another location and then import from that location. There is probably a way to check if a file is locked, that might be the way to go.
You are right, most of the VB
You are right, most of the VB examples that I also found don't work. Many of them suggested using the GetObject function which makes sense but I couldn't get any of the examples to work. I did finally find some code that seems to work but it is probably not for the faint of hear lol. Try it out and let me know if it works for you. When you are sending the name of the workbook to the function make sure you don't include the extension as it will probably give you a false.