PermissionError: [Errno 13] Permission denied: 'Abc.xlsx'

Dennis Lee Bieber wlfraed at ix.netcom.com
Thu Feb 10 13:21:25 EST 2022


On Wed, 9 Feb 2022 18:50:12 +0000, MRAB <python at mrabarnett.plus.com>
declaimed the following:

>On 2022-02-09 12:45, Christian Gollwitzer wrote:

>> It's impossible. Excel locks the file deliberately when it is open, so
>> that you can't overwrite it from a different program. Otherwise, the
>> file could become inconsistent.
>> 
>It's the same the other way too; you can't open the file in Excel while 
>Python has it open.
>
	While not tested with Excel, I /have/ encountered cases where an
application has locked the file for writing, but multiple readers are
permitted. Those would fail then if one attempts to write. {The other view
point is a library that does a complete open/read\write-all/close to memory
-- such an application might open/read/close, then Excel opens/locks, with
the application only learning of the change when it attempts the
open/write/close cycle}


-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
	wlfraed at ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/


More information about the Python-list mailing list