using GroupDocs.Redaction.Options; using GroupDocs.Redaction.Redactions; namespace GroupDocs.Redaction { internal class RemoveAnnotationsfromXLSXusingCSharp { static void Main(string[] args) { // Set License to avoid the limitations of Redaction library License lic = new License(); lic.SetLicense(@"GroupDocs.Redaction.lic"); // Control document redaction process, allowing to open, // redact and save documents using (Redactor redactor = new Redactor(@"sample.xlsx")) { // Remove all comments from the document, containing // texts like “use”, “show” or “describe” in its body redactor.Apply(new DeleteAnnotationRedaction("(?im:(use|show|describe))")); redactor.Save(new SaveOptions() { AddSuffix = true, RasterizeToPDF = false }); } } } }