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

copy between workbooks #380

Closed
JanMarvin opened this issue Oct 16, 2022 · 2 comments
Closed

copy between workbooks #380

JanMarvin opened this issue Oct 16, 2022 · 2 comments
Labels
enhancement 😀 New feature or request workbook 📖 wbWorkbook objects
Milestone

Comments

@JanMarvin
Copy link
Owner

Currently we only support copying sheets and styles on a single workbook. Ideally we should be able to copy workbooks across workbooks. Though that requires a lot of things we have to think about and to adjust.

We need to collect everything related to a worksheet

  • rels
  • shared strings
  • styles
  • pivot tables
  • slicers
  • charts
  • drawings
  • etc

We have to merge this with the new workbook and adjust all the references. Shared strings point to new indices. Same for styles. Names for references change.

Good news: It's definitely doable and a few parts of the clone code should already be useable.
Bad news: It's still a project and most likely not done on a single rainy weekend.

@JanMarvin JanMarvin added enhancement 😀 New feature or request workbook 📖 wbWorkbook objects labels Oct 16, 2022
@JanMarvin JanMarvin added this to the future milestone Oct 16, 2022
@olivroy
Copy link
Collaborator

olivroy commented Oct 13, 2023

Hi,

Just had the chance to try this out.

wb <- wb_workbook()$add_worksheet("xxx")
wb2 <- wb_workbook()$add_worksheet("aaa")
wb$clone_worksheet(old = "xxx", from = wb2)
# I would expect this sheet to be named xxx, but it is named next_sheet.

Otherwise, seems to work as expected for now. Will try it more after.

@JanMarvin
Copy link
Owner Author

Thanks, I’ll have a look when I revisit #807

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 😀 New feature or request workbook 📖 wbWorkbook objects
Projects
None yet
Development

No branches or pull requests

2 participants