Share point excel file is getting corrupted sometimes when i download and open in vm , when bot is executed

Share point excel file is getting corrupted sometimes when i download and open in vm , when bot is executed.
Also the file in share point is also getting corrupted after download!