expiry(wb.createSheet("Expiry"));\r
shadeAlt(wb.createSheet("Shade Alt"));\r
shadeBands(wb.createSheet("Shade Bands"));\r
+ \r
+ // TODO Add Icons, data bars etc, see bug #58130\r
\r
// Write the output to a file\r
String file = "cf-poi.xls";\r
import org.apache.poi.util.LittleEndianOutput;
/**
- * Conditional Formatting Rule Record (0x01B1).<br/>
- *
- * @author Dmitriy Kumshayev
+ * Conditional Formatting Rule Record (0x01B1).
+ *
+ * <p>This is for the older-style Excel conditional formattings,
+ * new-style (Excel 2007+) also make use of {@link CF12RuleRecord}
+ * and {@link CFExRuleRecord} for their rules.
*/
public final class CFRuleRecord extends StandardRecord {
-
public static final short sid = 0x01B1;
public static final class ComparisonOperator {
* // Apply Conditional Formatting rule defined above to the regions\r
* sheet.addConditionalFormatting(regions, rule);\r
* </PRE>\r
- *\r
- * @author Dmitriy Kumshayev\r
- * @author Yegor Kozlov\r
*/\r
public interface ConditionalFormatting {\r
\r
\r
/**\r
* Replaces an existing Conditional Formatting rule at position idx.\r
- * Excel allows to create up to 3 Conditional Formatting rules.\r
+ * Excel pre-2007 allows to create up to 3 Conditional Formatting rules,\r
+ * 2007 and later allow unlimited numbers.\r
* This method can be useful to modify existing Conditional Formatting rules.\r
*\r
- * @param idx position of the rule. Should be between 0 and 2.\r
+ * @param idx position of the rule. Should be between 0 and 2 for Excel before 2007, otherwise 0+.\r
* @param cfRule - Conditional Formatting rule\r
*/\r
void setRule(int idx, ConditionalFormattingRule cfRule);\r
\r
/**\r
* Add a Conditional Formatting rule.\r
- * Excel allows to create up to 3 Conditional Formatting rules.\r
+ * Excel pre-2007 allows to create up to 3 Conditional Formatting rules.\r
*\r
* @param cfRule - Conditional Formatting rule\r
*/\r
* @return number of Conditional Formatting rules.\r
*/\r
int getNumberOfRules();\r
-\r
-\r
}\r
\r
/**\r
* Represents a description of a conditional formatting rule\r
- *\r
- * @author Dmitriy Kumshayev\r
- * @author Yegor Kozlov\r
*/\r
public interface ConditionalFormattingRule {\r
/**\r
/**\r
* The 'Conditional Formatting' facet of <tt>Sheet</tt>\r
*\r
- * @author Dmitriy Kumshayev\r
- * @author Yegor Kozlov\r
* @since 3.8\r
*/\r
public interface SheetConditionalFormatting {\r
-\r
/**\r
* Add a new Conditional Formatting to the sheet.\r
*\r
* Add a new Conditional Formatting set to the sheet.\r
*\r
* @param regions - list of rectangular regions to apply conditional formatting rules\r
- * @param cfRules - set of up to three conditional formatting rules\r
+ * @param cfRules - set of up to conditional formatting rules (max 3 for Excel pre-2007)\r
*\r
* @return index of the newly created Conditional Formatting object\r
*/\r