[]
Gets or sets the display format applied to replaced cells during a replace operation.
Returns the IDisplayFormat configured for
Replace(object, object, ReplaceOptions). When this property is not
null, the replace operation uses the specified display format for matched cells
after their values are replaced. The default value is null.
public IDisplayFormat ReplaceFormat { get; set; }
Public Property ReplaceFormat As IDisplayFormat
worksheet.Range["A1"].Value = "Draft";
worksheet.Range["C1"].Font.Color = Color.Blue;
ReplaceOptions options = new ReplaceOptions();
options.ReplaceFormat = worksheet.Range["C1"].DisplayFormat;
IDisplayFormat replaceFormat = options.ReplaceFormat;
worksheet.Range["A1:A3"].Replace("Draft", "Final", options);