r-geoflow / geoflow

Tools to Orchestrate Geospatial (Meta)Data Management Workflows and Manage FAIR Services
https://github.com/r-geoflow/geoflow/wiki
Other
40 stars 14 forks source link

Is this possible to have same excel handler as csv one in metadata block #297

Closed kikislater closed 1 year ago

kikislater commented 1 year ago

I tested to load csv from Nextcloud for metadata block, it works like this

    "contacts" : [
      {
        "handler": "csv",
        "source": "https://drive.ird.fr/s/EaJ5qJ84GJdAS5r/download/geoflow_g2oi_contacts.csv"
      }

Full json available here : https://github.com/IRDG2OI/geoflow-g2oi/pull/10/files

When I change csv to excel

    "contacts" : [
      {
        "handler": "excel",
        "source": "https://drive.ird.fr/s/tfQxYSBtio2nK9n/download/geoflow_g2oi_contacts.xlsx"
      }

I got the following error whereas link is working. So it's not the same behaviour:

Error : `path` does not exist: ‘https://drive.ird.fr/s/tfQxYSBtio2nK9n/download/geoflow_g2oi_contacts.xlsx’
Erreur dans config$software : $ operator is invalid for atomic vectors

Any idea where do I have to look in the code to modify it ?

Thanks

eblondel commented 1 year ago

Hi @kikislater the Excel files handler is based on readxl::read_excel which doesn't allow directly to take remote files (contrary to readr::read_csv for example). I've added some piece of code to take care of download if it's remote;

kikislater commented 1 year ago

Hu! OK cool, I didn't know the difference between the two. Btw thank you I will test tomorrow

kikislater commented 1 year ago

Thank you it works ! https://github.com/IRDG2OI/geoflow-g2oi/pull/12