'How to read_excel() in r with the file opened in MS excel? [Evaluation error: zip file 'data.xlsx' cannot be opened.]

The read_excel() function works fine if I close the file in MS Excel, but if the file is opened, the error message pops up:

Error: Evaluation error: zip file 'plot_Regional comparison_cum2.xlsx' cannot be opened.

I used to read excel fine with my excel file open so I would like to know if there's a way to fix this. Some suggestions said the file restriction in MS can be modified, but not sure how to do that.

Any suggestions will be much appreciated!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source