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

"lost" formating, when exporting to excel #7

Closed
jueeir opened this issue Jan 23, 2017 · 2 comments
Closed

"lost" formating, when exporting to excel #7

jueeir opened this issue Jan 23, 2017 · 2 comments

Comments

@jueeir
Copy link

jueeir commented Jan 23, 2017

Hi,

I'd like to color different columns in the xlsx that I create, by using several rules for the fill gradient.

Everything looks nice in the R Studio Viewer, but any then the firat rule_fill_gradient seem to be ignored by condformat2excel.

When e.g. doing the following, only column 1 is colored with a green gradient...

output <- condformat(df4) + rule_fill_gradient(1, expression = overall_score, low = "white", high = "green", na.value = "#FFFFFF") + rule_fill_gradient(2, expression = overall_score, low = "white", high = "red", na.value = "#FFFFFF")

condformat2excel(output, output.xlsx)

@zeehio
Copy link
Owner

zeehio commented Jan 23, 2017

Hi,

Thanks for reporting the issue.

It would be much easier for me to reproduce your error if you provided a fully reproducible example.

Did you try to run this from the CRAN version or from the github version? Please try the latest development version:

#install.packages("devtools")
devtools::install_github("zeehio/condformat")

I used this code and it worked as expected:

library("condformat")
data(iris)
output <- condformat(iris) + 
  rule_fill_gradient(1, expression = Sepal.Length, low = "white", high = "green", na.value = "#FFFFFF") +
  rule_fill_gradient(2, expression = Sepal.Width, low = "white", high = "red", na.value = "#FFFFFF")

condformat2excel(output, "/tmp/output7.xlsx")

@zeehio
Copy link
Owner

zeehio commented Jan 23, 2017

Update: Testing the example in the latest version from CRAN seems to have the issue you describe. So this is an issue fixed in the development version that will be fixed in the next CRAN release.

In case you still have the error with the development version feel free to reopen the issue.

@zeehio zeehio closed this as completed Jan 23, 2017
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

No branches or pull requests

2 participants