[R] XLSX package + Excel creation question

Rainer Hurling rhurlin at gwdg.de
Thu Aug 29 15:36:45 CEST 2013


Am 29.08.2013 15:03 (UTC+1) schrieb Zsurzsa Laszlo:
> First of all thank you for the quick resposen.
> 
> I know I can color and set up every cell. I will take a look again *
> CellStyle* but is it possbile for example to write an array to a single
> cell that has different colors for some data. Basically the color depends
> on the data.

As far as I know there is no ready to use functionality to mask groups
of selected cells. You have to write your own function, which selects
the right cells and changes their style with setCellStyle(cell, cellStyle).

Some hints are given in the examples section of ?CellStyle.

> 
> -------------------------------------------------------------------------------------
> - László-András Zsurzsa,                                                -
> - Msc. Infromatics, Technical University Munich, Germany -
> - Scientific Employee, TUM                                             -
> -------------------------------------------------------------------------------------
> 
> 
> On Thu, Aug 29, 2013 at 2:55 PM, Rainer Hurling <rhurlin at gwdg.de> wrote:
> 
>> Am 29.08.2013 12:08 (UTC+1) schrieb Zsurzsa Laszlo:
>>> Dear R users,
>>>
>>> I have a question about the xlsx package. It's possible to create excel
>>> files and color cells and etc.
>>
>> yes, with package xlsx you can colourize you data sheets, even the
>> fonts. See for example ?CellStyle .
>>
>> A good demonstration of the capabilities is on
>>
>> http://tradeblotter.wordpress.com/2013/05/02/writing-from-r-to-excel-with-xlsx/
>>
>>>
>>> My question would be that is it possible to color only some part of the
>>> data hold in a cell. Let's assume I've got the following data :
>>> 167,153,120,100 and I want to color to red everything that is bigger then
>>> 120. How can I achive this using R.
>>>
>>> Example file setup with a few lines in attachment. (SEL_MASS column can
>> be
>>> used for example)
>>
>> Attachment missing ...
>>
>> HTH,
>> Rainer
>>
>>>
>>> Thank you in advance,
>>>
>> -------------------------------------------------------------------------------------
>>> - László-András Zsurzsa,                                                -
>>> - Msc. Infromatics, Technical University Munich, Germany -
>>> - Scientific Employee, TUM                                             -
>>>
>> -------------------------------------------------------------------------------------
>>
> 
> 	[[alternative HTML version deleted]]
> 
> 
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list