secondFormulaR1C1 property

String secondFormulaR1C1
getter/setter pair

Gets or sets the value or expression associated with the conditional format in R1C1 notation.

// Create a new Excel Document.
final Workbook workbook = Workbook();
// Accessing sheet via index.
final Worksheet sheet = workbook.worksheets[0];
sheet.getRangeByIndex(1, 1).setNumber(123);
sheet.getRangeByIndex(2, 1).setNumber(23);
sheet.getRangeByIndex(3, 1).setNumber(25);
sheet.getRangeByIndex(4, 1).setNumber(5);
sheet.getRangeByIndex(5, 1).setNumber(44);
sheet.getRangeByIndex(6, 1).setNumber(2);
sheet.getRangeByIndex(7, 1).setNumber(67);
sheet.getRangeByIndex(8, 1).setNumber(92);
sheet.getRangeByIndex(9, 1).setNumber(68);
sheet.getRangeByIndex(10, 1).setNumber(84);

//Applying conditional formatting to "A1:D4".
final ConditionalFormats conditions =
    sheet.getRangeByName('A1:D4').conditionalFormats;
final ConditionalFormat condition1 = conditions.addCondition();
//Set formatType.
  condition1.formatType = ExcelCFType.cellValue;

//Set operators.
condition1.operator = ExcelComparisonOperator.between;

//Set R1C1 style first formula.
condition1.firstFormulaR1C1 = '=R[1]C[0]';
//Set R1C1 style second formula.
condition1.secondFormulaR1C1 ='=R[8]C[0]';

//save and dispose.
final List<int> bytes = workbook.saveAsStream();
File('FormulaR1C1.xlsx').writeAsBytes(bytes);
workbook.dispose();

Implementation

late String secondFormulaR1C1;