All external connections and power queries are failing after running my python script which adds new rows into a separate table in my excel
My script I’m running in python is below. The script pulls all orders from a shopify store and adds them into a table in my excel. The script is working correctly however after running it and opening back my excel I get an error stating, “We found a problem with some content in ‘Analytics.xlsx’. Do you want us to try to recover as much as we can? If you trust this workbook, click Yes.”.
I click yes and each time it then deletes all my power queries and any external connections in my excel. My power queries do not have any reference to the table I am adding rows to through my script. If I make a copy of the excel and delete my power queries and external connections first I do not get any error either.