Skip to content
Advertisement

Python – Unable to export sql result to Excel

I want to export sql query result to excel file using Python. I queried the DB and able to retrieve the result set.Currently what im facing is like.Not able write the query result to Excel, Here is my Code,

JavaScript

When im running this code,its skipping to the except block.Is there anyway to figure out the issue?

———————EDIT——————— enter image description here

—————-EDIT 2——————-

enter image description here

Thanks, Teena

Advertisement

Answer

JavaScript

Try it and send screenshot

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement