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

Warning message "Found unknown folders in the input file: activeX" #1202

Closed
DataConnection opened this issue Dec 4, 2024 · 5 comments · Fixed by #1204
Closed

Warning message "Found unknown folders in the input file: activeX" #1202

DataConnection opened this issue Dec 4, 2024 · 5 comments · Fixed by #1204

Comments

@DataConnection
Copy link

Hi,

I get the warning message on opening the attached excel file - activeX-element.xlsx.
It was generated in Excel - an empty file, with just one activeX element added (in Excel from ribbon "Developer tools").

file <- openxlsx2::read_xlsx("activeX-element.xlsx")

Warning message:
Found unknown folders in the input file:
activeX
...

Probably similar to #1012

Thanks for fixing it - no need to hurry - and thanks for your great work!

Wolf

@JanMarvin
Copy link
Owner

Hi @DataConnection ,

thanks for the kind words! I assume you want the activeX element preserved? Unfortunately there is a minor issue here:
Screenshot 2024-12-04 at 19 47 26

Could you have a look if #1204 works for you? Since it is unlikely that I ever want to modify the activeX subfolder (or even want to understand its contents), I simply copy the contents from the original file when saving it. If you have access to - please also try if this works with files with more activeX elements.

You can install it like this:

remotes::install_github("JanMarvin/openxlsx2#1204")

@DataConnection
Copy link
Author

Hi @JanMarvin,

thank you very much for your fast reaction and the fix.
I checked #1204, no warning any more on opening the file, the rest works as expected.

Saving with wb_save and reopening in Excel loses some functionality - I get

<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
<logFileName>error049440_02.xml</logFileName>
<summary>Fehler in Datei 'K:\Test.xlsx'</summary>
<removedRecords>
<removedRecord>Entfernte Datensätze: Objekt von /xl/worksheets/sheet1.xml-Part</removedRecord>
</removedRecords>
</recoveryLog>

It looks like some properties of activeX elements (i.e. LinkedCell on InputBox) get lost.
But as I need openxlsx2 in this case only for reading, I don't mind. I would also not go in details with the activeX subfolder, I normally do not use them. But if you need any help in testing, feel free to reply.

Thanks again for your great work, we use openxlsx2 a lot.

Best

Wolf

@JanMarvin
Copy link
Owner

Thanks for the reply! Obviously loading and saving the file correctly is the goal :)
I fixed a thinko. Can you open the file now without complains?

Since I'm not familiar with activeX in spreadsheets, does this work in MS365 on Windows and if yes, how can I reproduce this?

@DataConnection
Copy link
Author

Yes - now opening the file in Office2021 on Windows works without complains (have no MS365). Great work!

@JanMarvin
Copy link
Owner

Perfect! Thanks for the follow up

@olivroy olivroy linked a pull request Dec 5, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants