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

前端 未结 3 2048
长情又很酷
长情又很酷 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:50

    You can use the workbook.get_worksheet_by_name() feature: https://xlsxwriter.readthedocs.io/workbook.html#get_worksheet_by_name

    According to https://xlsxwriter.readthedocs.io/changes.html the feature has been added on May 13, 2016.

    "Release 0.8.7 - May 13 2016

    -Fix for issue when inserting read-only images on Windows. Issue #352.

    -Added get_worksheet_by_name() method to allow the retrieval of a worksheet from a workbook via its name.

    -Fixed issue where internal file creation and modification dates were in the local timezone instead of UTC."

提交回复
热议问题