You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And the output looks like this:
You can see that in C2 there is the string "d" that should not be there. (The cell in the column named "d" should be an institution name, as before the column removal)
Extra context
It was hard to reproduce because when I changed the column names for my reprex, all of a sudden it worked without issue! The cell EXTRA originally had some other text. I changed it for privacy, which changed what string gets copied. Instead of "d", the cell C2 used to have content from A3 pasted into it. This changed after I manually edited the excel. Maybe it has something to do with the order in which cells were filled?
Possible cause
I'm not certain what causes this issue. My best guess would be something with pointers to shared strings, but I don't understand the topic well enough to see the problem. If I had to guess, using the "keep" object in the following line seems weird to me because it seems not to take into account the deleting of strings in the previous lines.
Hi @Mkranj , thanks for the report. @DavZim if you have a moment, could you have a look? I think this issue stems from your PR here: #418.
Btw I didn't merge (and probably wouldn't have merged) the PR and I have very strong reasons not to add something like this to openxlsx2, see here. And I believe that the same is true for openxlsx as well. Chances are that you unknowingly introduce issues that are very hard to spot into your workbook. The only case where this would be safe to use, is in an all data workbook - and in such a case I would always try to write the entire workbook from scratch.
Issue
Hi, this is a weird glitch that took some time to reproduce. Here is a sample excel file:
![image](https://private-user-images.githubusercontent.com/111303584/391869506-8511c33c-eb6e-439e-80e3-bb8adca54738.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNDg4NTcsIm5iZiI6MTczOTE0ODU1NywicGF0aCI6Ii8xMTEzMDM1ODQvMzkxODY5NTA2LTg1MTFjMzNjLWViNmUtNDM5ZS04MGUzLWJiOGFkY2E1NDczOC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwMDQ5MTdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yMGVlNGRjZjVmODk3MTE0ODY2MDkyYmM3MTgwZDZhZjMzMTA3NDAxYmZiYjcxZDM5ZGZkY2IyMzhjZDY2YmQ5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.d5medb8ASvwFPLDeNqf5CggtEWdtBTveSlL1SBqCtyI)
before.xlsx
Then I run this code to load the file, delete the 3rd column (C) and save to a new file:
And the output looks like this:
![image](https://private-user-images.githubusercontent.com/111303584/391869848-3dbf2108-6e20-4cba-bc9c-7e7f14358b76.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNDg4NTcsIm5iZiI6MTczOTE0ODU1NywicGF0aCI6Ii8xMTEzMDM1ODQvMzkxODY5ODQ4LTNkYmYyMTA4LTZlMjAtNGNiYS1iYzljLTdlN2YxNDM1OGI3Ni5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwMDQ5MTdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mYzk5NzE1NjE3OGE2ZmFiMWUwMmNkZWIzNDM5ZTFjZTVhMjg0M2YzYzNkMTRiYzIyMjUyNzgxOWRmMjkwYTE4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.U9fOvHiDLB0yOEP9ppUtTGhAzvs49lGcrNdx5LXxjFo)
You can see that in C2 there is the string "d" that should not be there. (The cell in the column named "d" should be an institution name, as before the column removal)
Extra context
It was hard to reproduce because when I changed the column names for my reprex, all of a sudden it worked without issue! The cell EXTRA originally had some other text. I changed it for privacy, which changed what string gets copied. Instead of "d", the cell C2 used to have content from A3 pasted into it. This changed after I manually edited the excel. Maybe it has something to do with the order in which cells were filled?
Possible cause
I'm not certain what causes this issue. My best guess would be something with pointers to shared strings, but I don't understand the topic well enough to see the problem. If I had to guess, using the "keep" object in the following line seems weird to me because it seems not to take into account the deleting of strings in the previous lines.
openxlsx/R/wrappers.R
Line 1929 in 69e00af
Thank you for your hard work!
The text was updated successfully, but these errors were encountered: