K
K
KraymiKrons2021-08-28 07:15:02
Python
KraymiKrons, 2021-08-28 07:15:02

How to make loop recording in Excel without overwriting?

How to make loop recording in Excel without overwriting?

workbook = xlsxwriter.Workbook('Test.xlsx')
                    worksheet = workbook.add_worksheet()
                    worksheet.set_column(0,0,75)
                    expenses = (
                        [''+h1[0], ''],
                        [''+phone, ''],
                        [''+h2, ''],
                        [''+vgm_url3, ''])
                    row = 0
                    col = 0
                    for item, cost in (expenses):
                        worksheet.write(row, col,     item)
                        worksheet.write(row, col + 1, cost)
                        row += 1

But I end up with only one entry

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question