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

New styling method #41

Merged
merged 16 commits into from
Oct 16, 2024
Merged

New styling method #41

merged 16 commits into from
Oct 16, 2024

Conversation

JulienBlasco
Copy link
Contributor

@JulienBlasco JulienBlasco commented Jun 12, 2024

Starting a pull request on a new method for styling elements. This should solve #10

It is an extension of the provided list style, which is based on constructor functions such as xls_theme() and its wrappers.

They can be passed to toxlsx and add_table as the themeand Theme arguments.

This is still work in progress:

  • create a constructor function for themes
  • create xls_theme_plain() and xls_theme_default() wrappers.
  • Add a theme argument to toxlsx and add_table
  • Update xls_theme_default() (according to Simplify default styling #40 )
  • Update the example gallery
  • Update NEWS

@JulienBlasco
Copy link
Contributor Author

JulienBlasco commented Jul 16, 2024

J'ajoute une todo-list :

  • Génération automatique des preview des excel
  • Modification des tables imprimées pour qu'elles s'impriment bien
  • Ajout d'un lien de téléchargement des excel
  • Modification des actions github dans le pkgdown.yml : https://github.com/jmservera/libreoffice-action

Morceau de code pertinent :

toxlsx(mtcars, path)

wb <- openxlsx::loadWorkbook(file.path(path, "Export.xlsx"))
for (sheet in wb$sheet_names) {
  openxlsx::pageSetup(wb, sheet, orientation = "landscape", fitToHeight=TRUE)
}
openxlsx::saveWorkbook(wb, file.path(path, "Export_preview.xlsx"), overwrite=TRUE)

Sys.setenv(LD_LIBRARY_PATH = "/usr/lib/libreoffice/program")
system2("/usr/bin/libreoffice", args = c("--headless",
                                "--convert-to",
                                "png",
                                shQuote(file.path(path, "Export_preview.xlsx")))
)

@ddotta
Copy link
Owner

ddotta commented Jul 19, 2024

Cool très ambitieux comme TODO @JulienBlasco ! J'adore l'idée de GHA pour libreoffice 😍

@JulienBlasco JulienBlasco marked this pull request as ready for review October 16, 2024 10:13
@JulienBlasco
Copy link
Contributor Author

JulienBlasco commented Oct 16, 2024

Je propose de fusionner cette branche pour publier rapidement une version 1.1.0 et profiter des nouveaux thèmes et surtout du fix de #18 .

Je crée une nouvelle issue pour la refonte des exemples

@JulienBlasco JulienBlasco mentioned this pull request Oct 16, 2024
6 tasks
Copy link
Owner

@ddotta ddotta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est ok pour moi @JulienBlasco, la documentation sera complétée dans une autre PR

@ddotta ddotta merged commit 66613f5 into ddotta:main Oct 16, 2024
4 checks passed
@ddotta
Copy link
Owner

ddotta commented Oct 16, 2024

C'est bon @JulienBlasco j'ai publié la release et une la v1.1.0 vient d'être publiée sur le CRAN : https://cran.r-project.org/web/packages/tablexlsx/index.html

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 this pull request may close these issues.

2 participants