That's just how things work: Excel keeps the file open while you're working on it, and Windows isn't going to give you write access to a file another program has open with write access to. I'd suggest that you detect that the file is held open by Excel (catch the exception from eval) and either allow the user to retry later (giving the opportunity to close the spreadsheet) or accept an alternate name to save the spreadsheet to.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In reply to Re: writing to an open Excel file
by roboticus
in thread writing to an open Excel file
by bts974
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |