Skip to content

Copying a sheet from one workbook to another does not work by sheet position #1092

Closed
@gdementen

Description

@gdementen

Test case:

with (la.open_excel(template_path) as template_wb,
      la.open_excel(dest_path, overwrite_file=True) as res_wb):
    res_wb[0] = template_wb[0]

Fix is to replace xw_excel.py, line 243 by:

# rename the new sheet if necessary
# if the key is an integer the name will be the source sheet name
# which is what we want
if isinstance(key, str):
    self[target_idx].name = key

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions