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

Output to ODS #46

Open
matt-dray opened this issue Mar 4, 2022 · 5 comments
Open

Output to ODS #46

matt-dray opened this issue Mar 4, 2022 · 5 comments
Labels
could MoSCoW priority ('on ice') documentation Improve or add documentation enhancement New feature or request
Milestone

Comments

@matt-dray
Copy link
Collaborator

matt-dray commented Mar 4, 2022

ODS files are the ideal output for publication, as indicated in the GOV.UK and GSS guidance.

Workbook-class objects created with {openxlsx} can't be written directly to ODS (?), you have to go with saveWorkbook() in the first instance.

Perhaps provide guidance rather than functionality? I think all the styling and markup are lost if you try to read in an Excel file, then save out to ODS.

@matt-dray matt-dray added documentation Improve or add documentation enhancement New feature or request labels Mar 4, 2022
@matt-dray matt-dray added the could MoSCoW priority ('on ice') label Jun 16, 2022
@matt-dray
Copy link
Collaborator Author

To note: this is something that the gptables team would also like to solve, but is also proving difficult in Python given the limits of the xlsx-related packages being wrapped.

@matt-dray
Copy link
Collaborator Author

At least for now, could we do something like:

system("libreoffice --headless --convert-to ods output-file.xlsx")

Which requires LibreOffice to be installed, of course.

Surely this is better than nothing?

@matt-dray
Copy link
Collaborator Author

Also suggested by Jan: JanMarvin/openxlsx2#574 (reply in thread)

@matt-dray
Copy link
Collaborator Author

@DIPAD-Fran-Bryden pointed out a convert_to_ods() function in {dftutils} (thank you!); could add documentation to {a11ytables} to suggest using this approach.

@DIPAD-Fran-Bryden
Copy link

@matt-dray To note as well, we used to use Excel when we were running R locally; no longer relevant to DfT but may be of interest to people without a Cloud setup? Or anyone who loves a good bit of VBS... https://github.com/department-for-transport/odsconvertr/blob/main/R/save_files.R

@matt-dray matt-dray added this to the Backlog milestone May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
could MoSCoW priority ('on ice') documentation Improve or add documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants