xlsxwriter: is there a way to open an existing worksheet in my workbook?

前端 未结 3 2051
长情又很酷
长情又很酷 2020-11-28 07:52

I\'m able to open my pre-existing workbook, but I don\'t see any way to open pre-existing worksheets within that workbook. Is there any way to do this?

3条回答
  •  旧巷少年郎
    2020-11-28 08:39

    After searching a bit about the method to open the existing sheet in xlxs, i discovered

    existingWorksheet = wb.get_worksheet_by_name('Your Worksheet name goes here...')
    existingWorksheet.write_row(0,0,'xyz')
    

    You can now append/write any data to the open worksheet. I hope it helps. Thanks

提交回复
热议问题