org.jxls.transform.poi.PoiConditionalFormatting Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jxls-poi Show documentation
Show all versions of jxls-poi Show documentation
Apache POI Transformer implementation for Jxls library
package org.jxls.transform.poi;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.apache.poi.ss.usermodel.ConditionalFormatting;
import org.apache.poi.ss.usermodel.ConditionalFormattingRule;
import org.apache.poi.ss.util.CellRangeAddress;
public class PoiConditionalFormatting {
private final List rules = new ArrayList<>();
private final List ranges;
PoiConditionalFormatting(ConditionalFormatting conditionalFormatting) {
for(int i = 0; i < conditionalFormatting.getNumberOfRules(); i++){
rules.add(conditionalFormatting.getRule(i));
}
ranges = Arrays.asList(conditionalFormatting.getFormattingRanges());
}
public List getRules() {
return rules;
}
public List getRanges() {
return ranges;
}
}