Hello Aspose Support,
I am using aspose.cells Java API to read Conditional Formatting settings including conditions, styles, fonts, etc. from an Excel 2010 .xlsx OOXML style file. The project I am working on has a UI which displays the Excel spread sheet and allows users to make changes to cell values and then recalculate formulas and apply the conditional formatting.
Right now I am trying to implement cascading conditional formatting as it exists in Excel 2010, however it appears to me that the aspose.cells Java API lacks sufficient functionality for me to emulate this behavior exactly. Although I can probably implement similar behavior, I would like to confirm whether the API provides the functionality I require and if not, can this functionality be added to aspose.cells in a timely fashion.
What I would like to be able to do with aspose is detect when a conditional format style has a font option not set as opposed to set to the “default” value. For example in the aspose.cells Font class there are methods isBold, isItalic, isStrikeout, getColor, and getUnderline. Whether or not the user sets any Font options for a FormatCondition, it appears that these methods always return the same default value when called on the Font from FormatCondition.getStyle().getFont(). It would be convenient if there were some way of determining if the style is not set by the user which is different from set to a default value for a conditional format font.
As an example of what I would like to be able to detect which I do not think I can detect with Aspose, please follow the directions below:
1. Create a new Excel 2010 spread sheet
2. Enter a value in cell A1, say 2
3. Select cell A1 then on the Home tab click Conditional Formatting then click Manage Rules
4. Select “Show formatting rules for current selection”
5. Make a new rule
5a. Click “New Rule”
5b. Select “Format only cells that contain”
5c. Enter a condition such as “Cell Value between 1 and 10”
5d. Click Format
5e. Select “Font style” “Bold”, “Underline” “Double”, click “Strikethrough”, and choose a color such as Red from the Color drop down box then click ok.
5f. Click OK for the rule
6. Create another rule with higher priority
6a. Click “New Rule”
6b. Select “Format only cells that contain”
6c. Enter a condition such as “Cell Value between 1 and 10”
6d. Leave the Format unset
7. Validate that the “Stop if True” is not selected for any of the rules and that the rule with no format settings has higher priority.
8. Observe that the format settings of the second rule take effect
9. Modify the Font for the higher priority rule. After opening its Font settings do the following:
9a. Select “Underline” none
9b. Click “strike through” then click “strike through” a second time to deselect it
9c. Select “Font style” regular
9d. Select “Color” “automatic”
10. Click OK for the font and rule and note that despite that the first conditional format has all “default” values for the Font that just because they were deliberately selected, they take priority over the second conditional format and there is no way to detect this with aspose.cells.
Please let me know if there is a way in aspose to detect whether a font option has been selected as part of a conditional format so that I might be able to emulate this cascading behavior. I suspect that there may be other places in the API with similar deficiencies.
Please see attached Excel spreadsheet and examine conditional formatting settings for cell A1 and A2 if my instructions for recreating the issue are not clear. If you have any questions, please let me know.
Thank you,
Jonathan Sobieski
jesobies@us.ibm.com
This message was posted using Page2Forum (attachment) from
http://community.aspose.com/community/login.aspx?ReturnUrl=/community/public/page2forum.aspx?SectionID=19&Referer=documentation