Importing from a LibreOffice Calc workbook

365 Views Asked by At

I have a LibreOffice Calc workbook with three worksheets. I'm trying to import data from the third worksheet. I've tried both the readODS and rio packages, but they keep returning the same error message:

Error: .onLoad failed in loadNamespace() for cli; details: call: fun(libname, pkgname) error: object 'clic_start_thread' not found

The readODS package's get_num_sheets_in_ods and list_ods_sheets functions work as expected. But its read_ods command throws the error above.

In particular, read_ods(path = "data/myFile.ods", sheet="Foobar", skip=2, range= "A3:E184") throws the error message above.

OTOH, the rio package's convert and import commands, without anything fancy, also throw the error message reproduced above.

I suspect the CLI package is being used to parse commands in both packages, but I'm at a loss for how these two packages seem to be choking on the neighborhoods. How should I debug these error messages?

1

There are 1 best solutions below

1
On

Kat,

Your hint led me to the solution! Thank you, thank you, thank you!!!

After I failed to replicate duckmayr's example, I realized the problem was my configuration. I searched the web for ".onLoad failed in loadNamespace() for 'cli' clic." While I didn't come up with anything specifically for the cli package, I came across several cases in which the solution was to reinstall or reconfigure the offending package.

So, I tried running install.packages("cli"), and this fixed the problem.

Funny how knowing what the solution is not can lead to understanding what the solution is.