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

saveWorkbook corrupts .xlsx file with sheet names containing "&" character #539

Open
pkohvaei opened this issue Jan 26, 2022 · 0 comments
Open

Comments

@pkohvaei
Copy link

Hello,

Here I explain how I see the problem:

Steps to Reproduce the Problem

  1. With wb <- loadWorkbook(my_file_path) I can view the following:

`

Sheet 1: "BioSafety"
Custom row heights (row: height)
 1: 15.5, 3: 25.5, 12: 15, 31: 13.5, 32: 13.5 

Sheet 2: "Project Info & Notes"
Custom row heights (row: height)
 3: 39, 20: 26.5, 24: 52.5 
Custom column widths (column: width)
  2: 21.88, 3: 35.18, 5: 39.18, 6: 59.58, 7: 18.58, 8: 17.38, 10: 76.38, 11: 11.18
 ...

`

  1. With saveWorkbook(wb, my_new_path, overwrite = T) I get a prompt when trying to open the new file in Excel:

The workbook cannot be opened or repaired by Microsoft Excel because it is corrupt.

  1. This is a workbook with 12 sheets, 2 containing "&" in their names. If I delete those two, saveWorkbook() works fine.

sessionInfo()

  • Version of openxlsx: 4.2.3
  • Version of R: 3.6.3

Thank you,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant