how to hide gridlines and autofit columns width in excel by python
i'm trying to hide the gridlines and autofit columns width in the alterable excel files but i can't find the correct code code: FP_sheet=pd.read_excel(r"C:\Users\Mahmoud.Bader\Desktop\FP Attendance V1.6 Apr 22.xlsx","Attendance").fillna("") FP_sheet['Date']=pd.to_datetime(FP_sheet['Date']).dt.date dep = FP_sheet["Department"].unique() #x=('Customer Care','Retail Customer Care','Social Media') for i in dep: FP_Attendance = FP_sheet[FP_sheet["Department"].str.contains(i)] FP_Attendance=FP_Attendance.style.set_properties(**{'color':'black','text-align': 'center','font-family': 'Arial Narrow','border-color':'Black','border-width':'thin','border-style':'solid','vertical-align': 'middle'}) FP_Attendance.style.hide_index() with pd.ExcelWriter(f"C:\\Users\\Mahmoud.Bader\\Desktop\\Python\\Workforce Reports\\FP Test\\{i}.xlsx",engine='xlsxwriter') as writer: FP_Attendance.to_excel(writer,sheet_name=str(i), index=False,freeze_panes=(1,0))