I'm attempting to create numerous columns in Excel. I have a list that looks like this.
list1=[1,2,3,4,5]
the other list will be like
list2=['a','b','c']
I can't make a dataframe in pandas and write it since I will have several varied sized(length) lists.
list3=['1a','2b','3c','4d']
I want it in excel be like
I am not sure which framework to use, openpyxl or pandas which will solve this issue
I have used your suggestion in this way;
with pd.ExcelWriter(var_path, engine='openpyxl', mode='r+', if_sheet_exists='overlay') as writer:
book = load_workbook(var_path)
current_sheet = book[var_sheetname]
Column_H = current_sheet['H']
try:
maxrow = max(c.row for c in Column_H if c.value is not None)
except ValueError:
maxrow = 1
print(var_sheetname,maxrow,'writing docs')
var_inp.to_excel(writer,startrow=maxrow,columns=Column_H,sheet_name=var_sheetname,index=False,header=False