Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Greetings,
I am trying to extract table data into excel through python visual but if file with same filename is already open. It gives Permission denied error. I tried with try and except but it didnot work. Is there any way to handle this error? TIA
Regards,
N
Hi,
Could you please give more info about your issue?
Best Regards,
Giotto
Hello Giotto,
1. I have written a code to export my table into an excel (say abc.xlsx). this works fine.
2. But if i have the same excel (abc.xlsx) open and try to run my code and save the excel with same name i get permission denied error.
How to handle this exception?
Technically i want to add a message window saying the file is already open.
TIA
is the excel file open? is that what you saying? you need to close the excel file
Proud to be a Super User!
Hello,
Yes, when the excel is open.
May users will be using this report and i am sure they will keep the excel file open and try to make changes to the report and run the code.
I am trying to add a message saying excel file is open.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 37 | |
| 33 | |
| 29 | |
| 27 |
| User | Count |
|---|---|
| 134 | |
| 104 | |
| 63 | |
| 60 | |
| 55 |