I am trying to write to a single Excel worksheet but the program is creating a new worksheet for each new row I am appending:
applicationList = []
i = 0
maxLengthList = 6
while len(applicationList) < maxLengthList:
application = input("Enter the application name: ")
applicationList.append(application)
# Convert the dataframe to an XlsxWriter Excel object.
output_df = df.query('Name=="%s"' % applicationList[i])
i += 1
with pd.ExcelWriter("Test.xlsx", mode="a") as writer:
output_df.to_excel(writer)
Can someone show me how to write all rows to the same work sheet so that there will be 6 rows in one worksheet instead of 1 row in 6 worksheets?