i am trying to add image into the existing excel sheet by using xlsxwriter module
import xlsxwriter
workbook = xlsxwriter.Workbook('C:/Users/Desktop/blank.xlsx')
worksheet = workbook.get_worksheet_by_name('Sheet1')
worksheet.insert_image('B5', 'C:/Users/Desktop/CaseDeatails/Abc.jpg')
i am getting the below error
Traceback (most recent call last): File "C:\Users\Desktop\insertImage.py", line 23, in worksheet.insert_image('B5', 'C:/Users/Desktop/CaseDeatails/Abc.jpg') AttributeError: 'NoneType' object has no attribute 'insert_image'
Please help me on this error