You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think I am going to provide that level of fine tuning for excel myself, since I feel it is at the limit of the scope of the package.
However, condformat uses openxlsx to export to Excel, and the following example code may be useful, if you combine it with function calls to openxlsx (please read the documentation for that package).
This is a minimal example:
library(condformat)
library(openxlsx)
data(iris)
x <- condformat(iris)
wb <- openxlsx::createWorkbook(creator = "")
addWorksheet(wb, sheetName = "sheet name")
condformat:::condformat2excelsheet(x, wb, "sheet name")
# Add here any other openxlsx function call to format the columns any way you want
saveWorkbook(wb, file = "iris.xlsx")
If this works for you, please tell me and I will document and export condformat2excelsheet in a future version, so you don't need ::: anymore.
I tried and the method did work. However, I was not able to simultaneously color a cell and apply a number style like a $ sign or a percent sign to the same cell.
Hi,
If I am exporting data frames to excel, can I show the currency and percentage symbols in the excel spreadsheet on certain columns ($, %)?
Cheers!
The text was updated successfully, but these errors were encountered: