Created
October 19, 2017 10:59
-
-
Save GroupDocsGists/de110831d1ac7c110fcca9e4220edd20 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET | |
using (CellsDocument doc = Document.Load<CellsDocument>(Utilities.MapSourceFilePath(FilePath))) | |
{ | |
foreach (CellsWorksheet section in doc.Worksheets) | |
{ | |
for (var i = section.Shapes.Count - 1; i >= 0; i--) | |
{ | |
foreach (var fragment in section.Shapes[i].FormattedTextFragments) | |
{ | |
if (fragment.ForegroundColor == Color.Red && fragment.Font.FamilyName == "Arial") | |
{ | |
section.Shapes.RemoveAt(i); | |
break; | |
} | |
} | |
} | |
} | |
doc.Save(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment