Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gdementen opened this issue Feb 1, 2024 · 0 comments

Comments

@gdementen
Copy link
Contributor

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant