EvotecIT / OfficeIMO

Fast and easy to use cross-platform .NET library that creates or modifies Microsoft Word (DocX) and later also Excel (XLSX) files without installing any software. Library is based on Open XML SDK
MIT License
286 stars 50 forks source link

FindAndReplace allowed for specific paragraphs #171

Closed startewho closed 10 months ago

startewho commented 10 months ago

we have the full doc replace ,and sometimes ,we will want just replace from a list paras(indeed it was a real paragraph).so I pulic the FindAndReplace method

public static  int  FindAndReplace(List<WordParagraph> paragraphs, string textToFind, string textToReplace, StringComparison stringComparison = StringComparison.OrdinalIgnoreCase)
PrzemyslawKlys commented 10 months ago

Great, can you add tests/example?

startewho commented 10 months ago

add tests/exampl

add table cell test

PrzemyslawKlys commented 10 months ago

I've improved test a bit, thank you for this