You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Maheshwar Jayaraman <ma...@hotmail.com> on 2016/01/26 19:13:37 UTC
Ability to set solid color on DataBarFormatting
In using XSSFSheet and programmatically setting a conditional formatting rule with DataBar on a range of cells, the resulting excel always has a gradient for the databar. I have searched long and hard and have been unable to really see API level support for this. Has there been any asks for this in the past? I would like to attempt an patch if this can have more wide spread use.
Mahesh
Re: Ability to set solid color on DataBarFormatting
Posted by Nick Burch <ap...@gagravarr.org>.
On Wed, 3 Feb 2016, Maheshwar Jayaraman wrote:
>> Interesting. The spec from 2009
>> (https://msdn.microsoft.com/en-us/library/hh656506(v=office.12).aspx)
>> does have the attribute but I see POI is using 2006. Is there a reason
>> its not updated?
>
> Nick, Any pointers?
I've got a feeling that someone tried, and loads of stuff broke... Your
best bet would be to check the mailing list archives, and see if you can
find the threads discussing it, probably from something like 3-4 years ago
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Ability to set solid color on DataBarFormatting
Posted by Maheshwar Jayaraman <ma...@hotmail.com>.
Nick, Any pointers?
Mahesh
On 2/1/16, 10:55 AM, "Maheshwar Jayaraman" <ma...@hotmail.com> wrote:
>Interesting. The spec from 2009 (https://msdn.microsoft.com/en-us/library/hh656506(v=office.12).aspx) does have the attribute but I see POI is using 2006. Is there a reason its not updated?
>Mahesh
>
>
>
>
>On 2/1/16, 10:35 AM, "Nick Burch" <ap...@gagravarr.org> wrote:
>
>>On Mon, 1 Feb 2016, Maheshwar Jayaraman wrote:
>>> Thanks for the instructions. I realize I need to make changes to the
>>> underlying CT_DataBar class as well as that defines the actual attribute
>>> for gradient.
>>
>>That'll be a problem. The way to get a fix in that is to get ECMA and/or
>>ISO to update the specification... The CT classes are auto-generated from
>>the published OOXML specification schema
>>
>>Nick
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
>>For additional commands, e-mail: user-help@poi.apache.org
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Ability to set solid color on DataBarFormatting
Posted by Maheshwar Jayaraman <ma...@hotmail.com>.
Interesting. The spec from 2009 (https://msdn.microsoft.com/en-us/library/hh656506(v=office.12).aspx) does have the attribute but I see POI is using 2006. Is there a reason its not updated?
Mahesh
On 2/1/16, 10:35 AM, "Nick Burch" <ap...@gagravarr.org> wrote:
>On Mon, 1 Feb 2016, Maheshwar Jayaraman wrote:
>> Thanks for the instructions. I realize I need to make changes to the
>> underlying CT_DataBar class as well as that defines the actual attribute
>> for gradient.
>
>That'll be a problem. The way to get a fix in that is to get ECMA and/or
>ISO to update the specification... The CT classes are auto-generated from
>the published OOXML specification schema
>
>Nick
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
>For additional commands, e-mail: user-help@poi.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Ability to set solid color on DataBarFormatting
Posted by Nick Burch <ap...@gagravarr.org>.
On Mon, 1 Feb 2016, Maheshwar Jayaraman wrote:
> Thanks for the instructions. I realize I need to make changes to the
> underlying CT_DataBar class as well as that defines the actual attribute
> for gradient.
That'll be a problem. The way to get a fix in that is to get ECMA and/or
ISO to update the specification... The CT classes are auto-generated from
the published OOXML specification schema
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Ability to set solid color on DataBarFormatting
Posted by Maheshwar Jayaraman <ma...@hotmail.com>.
Nick,
Thanks for the instructions. I realize I need to make changes to the underlying CT_DataBar class as well as that defines the actual attribute for gradient. That is a separate library. Is there a standard process for stacking such dependent changes across 2 libraries?
Mahesh
On 1/27/16, 10:39 AM, "Nick Burch" <ap...@gagravarr.org> wrote:
>On Tue, 26 Jan 2016, Maheshwar Jayaraman wrote:
>> The default is gradient fill for a data bar. I wanted it to be a solid
>> (I think it translates to a gradient=0 attribute). I spent enough time
>> trying to set this via reflection that I think I can take a stab at
>> adding a patch for this. I will read docs to see how to contribute and
>> take it forward from there.
>
>First thing would be to produce new versions of
>NewStyleConditionalFormattings.xls / NewStyleConditionalFormattings.xlsx
>which add in examples of the formatting you want into additional columns
>
>Next, work out how to read that difference (unzip the XLSX file & read the
>xml / use BiffViewer)
>
>Next, work out a sensible way to expose that difference in the conditional
>formatting usermodel classes
>
>Now, add that to the usermodel, and matching lower level code as needed
>
>Then update the unit tests to check on read and write
>
>Finally, update the example to also generate these
>
>And then you're done :)
>
>Nick
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
>For additional commands, e-mail: user-help@poi.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Ability to set solid color on DataBarFormatting
Posted by Nick Burch <ap...@gagravarr.org>.
On Tue, 26 Jan 2016, Maheshwar Jayaraman wrote:
> The default is gradient fill for a data bar. I wanted it to be a solid
> (I think it translates to a gradient=0 attribute). I spent enough time
> trying to set this via reflection that I think I can take a stab at
> adding a patch for this. I will read docs to see how to contribute and
> take it forward from there.
First thing would be to produce new versions of
NewStyleConditionalFormattings.xls / NewStyleConditionalFormattings.xlsx
which add in examples of the formatting you want into additional columns
Next, work out how to read that difference (unzip the XLSX file & read the
xml / use BiffViewer)
Next, work out a sensible way to expose that difference in the conditional
formatting usermodel classes
Now, add that to the usermodel, and matching lower level code as needed
Then update the unit tests to check on read and write
Finally, update the example to also generate these
And then you're done :)
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Ability to set solid color on DataBarFormatting
Posted by Nick Burch <ap...@gagravarr.org>.
On Wed, 27 Jan 2016, Maheshwar Jayaraman wrote:
> I have one question. Which branch should I submit the patch on? Trunk or
> REL_3_11_branch?
Trunk - we're working up to 3.14 final at the moment!
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Ability to set solid color on DataBarFormatting
Posted by Maheshwar Jayaraman <ma...@hotmail.com>.
I have one question. Which branch should I submit the patch on? Trunk or REL_3_11_branch?
Mahesh
On 1/26/16, 11:28 PM, "Dominik Stadler" <do...@gmx.at> wrote:
>Hi Mahesh,
>
>thanks for taking a look, let us know if you run into problems so we can
>try to help out.
>
>Dominik.
>
>
>On Tue, Jan 26, 2016 at 10:49 PM, Maheshwar Jayaraman <
>maheshwar_eng@hotmail.com> wrote:
>
>> The default is gradient fill for a data bar. I wanted it to be a solid (I
>> think it translates to a gradient=0 attribute). I spent enough time trying
>> to set this via reflection that I think I can take a stab at adding a patch
>> for this. I will read docs to see how to contribute and take it forward
>> from there.
>> Mahesh
>>
>>
>>
>> On 1/26/16, 11:28 AM, "Murphy, Mark" <mu...@metalexmfg.com> wrote:
>>
>> >I asked if anyone could tell me how to do a gradient fill a couple months
>> ago. I do not believe the API supports it yet.
>> >
>> >-----Original Message-----
>> >From: Maheshwar Jayaraman [mailto:maheshwar_eng@hotmail.com]
>> >Sent: Tuesday, January 26, 2016 1:14 PM
>> >To: user@poi.apache.org
>> >Subject: Ability to set solid color on DataBarFormatting
>> >
>> >In using XSSFSheet and programmatically setting a conditional formatting
>> rule with DataBar on a range of cells, the resulting excel always has a
>> gradient for the databar. I have searched long and hard and have been
>> unable to really see API level support for this. Has there been any asks
>> for this in the past? I would like to attempt an patch if this can have
>> more wide spread use.
>> >
>> >Mahesh
>> >
>> >
>> >---------------------------------------------------------------------
>> >To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
>> >For additional commands, e-mail: user-help@poi.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
>> For additional commands, e-mail: user-help@poi.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Ability to set solid color on DataBarFormatting
Posted by Dominik Stadler <do...@gmx.at>.
Hi Mahesh,
thanks for taking a look, let us know if you run into problems so we can
try to help out.
Dominik.
On Tue, Jan 26, 2016 at 10:49 PM, Maheshwar Jayaraman <
maheshwar_eng@hotmail.com> wrote:
> The default is gradient fill for a data bar. I wanted it to be a solid (I
> think it translates to a gradient=0 attribute). I spent enough time trying
> to set this via reflection that I think I can take a stab at adding a patch
> for this. I will read docs to see how to contribute and take it forward
> from there.
> Mahesh
>
>
>
> On 1/26/16, 11:28 AM, "Murphy, Mark" <mu...@metalexmfg.com> wrote:
>
> >I asked if anyone could tell me how to do a gradient fill a couple months
> ago. I do not believe the API supports it yet.
> >
> >-----Original Message-----
> >From: Maheshwar Jayaraman [mailto:maheshwar_eng@hotmail.com]
> >Sent: Tuesday, January 26, 2016 1:14 PM
> >To: user@poi.apache.org
> >Subject: Ability to set solid color on DataBarFormatting
> >
> >In using XSSFSheet and programmatically setting a conditional formatting
> rule with DataBar on a range of cells, the resulting excel always has a
> gradient for the databar. I have searched long and hard and have been
> unable to really see API level support for this. Has there been any asks
> for this in the past? I would like to attempt an patch if this can have
> more wide spread use.
> >
> >Mahesh
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> >For additional commands, e-mail: user-help@poi.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>
Re: Ability to set solid color on DataBarFormatting
Posted by Maheshwar Jayaraman <ma...@hotmail.com>.
The default is gradient fill for a data bar. I wanted it to be a solid (I think it translates to a gradient=0 attribute). I spent enough time trying to set this via reflection that I think I can take a stab at adding a patch for this. I will read docs to see how to contribute and take it forward from there.
Mahesh
On 1/26/16, 11:28 AM, "Murphy, Mark" <mu...@metalexmfg.com> wrote:
>I asked if anyone could tell me how to do a gradient fill a couple months ago. I do not believe the API supports it yet.
>
>-----Original Message-----
>From: Maheshwar Jayaraman [mailto:maheshwar_eng@hotmail.com]
>Sent: Tuesday, January 26, 2016 1:14 PM
>To: user@poi.apache.org
>Subject: Ability to set solid color on DataBarFormatting
>
>In using XSSFSheet and programmatically setting a conditional formatting rule with DataBar on a range of cells, the resulting excel always has a gradient for the databar. I have searched long and hard and have been unable to really see API level support for this. Has there been any asks for this in the past? I would like to attempt an patch if this can have more wide spread use.
>
>Mahesh
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
>For additional commands, e-mail: user-help@poi.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
RE: Ability to set solid color on DataBarFormatting
Posted by "Murphy, Mark" <mu...@metalexmfg.com>.
I asked if anyone could tell me how to do a gradient fill a couple months ago. I do not believe the API supports it yet.
-----Original Message-----
From: Maheshwar Jayaraman [mailto:maheshwar_eng@hotmail.com]
Sent: Tuesday, January 26, 2016 1:14 PM
To: user@poi.apache.org
Subject: Ability to set solid color on DataBarFormatting
In using XSSFSheet and programmatically setting a conditional formatting rule with DataBar on a range of cells, the resulting excel always has a gradient for the databar. I have searched long and hard and have been unable to really see API level support for this. Has there been any asks for this in the past? I would like to attempt an patch if this can have more wide spread use.
Mahesh