Iam using below code form reading data and split it then write it again and all action done correctly but when i checking in excel workbook the values that correspond by excel function on data wrote by df.to_excel i found that function didn't recognize it till i go to cell and open it the press enter
import pandas as pd
df1 = pd.read_excel(io=IP+'.xlsx',sheet_name='VLAN', header=None)
df2 = pd.read_excel(io=IP+'.xlsx',sheet_name='Profile', header=None)
# Code to separate data
df1 = df1[0].str.split(' |:', expand=True)
df2 = df2[0].str.split(' |:', expand=True)
# Save and close the workbook
with pd.ExcelWriter(path=IP+'.xlsx',engine='openpyxl',if_sheet_exists='replace',mode='a') as write:
df1.to_excel(write , sheet_name='VLAN', header=None, index=False)
df2.to_excel(write , sheet_name='Profile', header=None, index=False)