I want to add border around a range of cells like this image1, but my output file looks like this when I applied "set_column" function image2. instead of "set_column", is there any other functions to use?
writer=pd.ExcelWriter('merge_'+name+'.xlsx',
engine='xlsxwriter')
workbook = writer.book
data.to_excel(writer, sheet_name=SheetName,index=False,na_rep=0)
worksheet = writer.sheets[SheetName]
border_format=workbook.add_format({
'border':1,
'align':'left',
'font_size':10
})
worksheet.set_column('A:D',12,border_format)
Thank you in advance,